• css写简单导航


    简单的导航

    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="UTF-8">
    		<title></title>
    		<style>
    			*{margin:0;padding:0;}
    			ul,li{
    				list-style:none;
    			}
    			a{
    				text-decoration: none;
    			}
    			nav{
    				600px;
    				margin:50px auto;
    			}
    			nav ul{
    				100%;
    				display:flex;
    			}
    			nav li{
    				flex:1;
    				text-align: center;
    				60px;
    				margin-right:10px;
    			}
    			.item-list{
    				display:block;
    				color: #0099fb;
    			    font-size: 16px;
    			    position: relative;
    			}
    			.item-list:before{
    				position:absolute;
    				left:0;
    				top:-4px;
    				100%;
    				height:2px;
    				content:"";
    				background:#fff;
    			}
    			.item-list:after{
    				position:absolute;
    				left:0;
    				bottom:-4px;
    				100%;
    				height:2px;
    				content:"";
    				background:#fff;
    			}
    			nav li a:hover{
    				color:red;
    			}
    			nav li a:hover::before{
    				/*position:absolute;
    				left:0;
    				top:-4px;
    				100%;
    				height:2px;
    				content:"";*/
    				background:red;
    			}
    			nav li a:hover::after{
    				/*position:absolute;
    				left:0;
    				bottom:-4px;
    				100%;
    				height:2px;
    				content:"";*/
    				background:red;
    			}
    		</style>
    	</head>
    	<body>
    		<nav>
    			<ul>
    				<li>
    					<a class="item-list">指南</a>
    				</li>
    				<li>
    					<a class="item-list">组件</a>
    				</li>
    				<li>
    					<a class="item-list">实践</a>
    				</li>
    				<li>
    					<a class="item-list">概览</a>
    				</li>
    				<li>
    					<a class="item-list">iView Cli</a>
    				</li>
    				<li>
    					<a class="item-list">GitHub</a>
    				</li>
    			</ul>
    		</nav>
    	</body>
    </html>
  • 相关阅读:
    [BZOJ2038]小Z的袜子
    [BZOJ5016]一个简单的询问
    [BZOJ1008][HNOI2008]越狱
    [FZU2254]英语考试
    利用Map 的merge方法统计数量
    List 原生态类型
    try-with-resource 关闭 io流
    利用构建器创建对象
    linux 安装 vault
    git 上传文件
  • 原文地址:https://www.cnblogs.com/zylily/p/9020489.html
Copyright © 2020-2023  润新知