zoukankan      html  css  js  c++  java
  • 右侧定位的样式

    html

    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="UTF-8">
    		<title>右侧定位</title>
    		<style>
    		 * {
                margin: 0;
                padding: 0;
            }
            #content {
                 800px;
                margin: 0 auto;
                padding: 20px;
                  border: 1px dotted #0088bb;
            }
               #menu {
                position: fixed;
                top: 100px;
                left: 50%;
                margin-left: 450px;
                 50px;
            }
              #menu ul li a {
                display: block;
                margin:  0;
                font-size: 14px;
                font-weight: bold;
                color: #333;
                 80px;
                height: 50px;
                line-height: 50px;
                text-decoration: none;
                text-align: center;
            }
    		</style>
    	</head>
    	<body>
    		<div id="menu">
        <ul>
            <li><a href="#item1" class="current">1F 男装</a></li>
            <li><a href="#item2">2F 女装</a></li>
            <li><a href="#item3">3F 美妆</a></li>
            <li><a href="#item4">4F 数码</a></li>
            <li><a href="#item5">5F 母婴</a></li>
        </ul>
    </div>
    		<div id="content">
    			<a href="#"><img src="img/1F.jpg" alt=""/></a></li>
    		</div>
    	</body>
    </html>
    

      使用

    left: 50%;
                margin-left: 450px;
    

     就可以实现

     效果:

  • 相关阅读:
    TO DO List
    springboot 热部署
    <dependencyManagement>的作用
    人体工程学座椅
    temp
    temp
    声明式编程和命令式编程的本质区别
    weak first question
    Spring依赖注入方式和依赖来源
    SpringBoot 整合 H2 数据库
  • 原文地址:https://www.cnblogs.com/guangzhou11/p/7659703.html
Copyright © 2011-2022 走看看