zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    XML&nbsp; XmlDocument
    程序集报错
    程序打开网页
    写入文件txt
    读取文件txt
    MSM8953中Android系统添加启动脚本.rc文件
    SELinux基础知识
    嵌入式Linux设备查看USB相关信息
    Linux内核态文件读写相关函数API
    C语言中sscanf()函数相关用法
  • 原文地址:https://www.cnblogs.com/zylily/p/9020489.html
Copyright © 2011-2022 走看看