头闻号

中山市古镇慧兴灯饰配件门市部

灯杯|灯头、灯座|其他灯具配附件|支架|灯盘

首页 > 新闻中心 > 科技常识:html5 css3网站菜单实现代码
科技常识:html5 css3网站菜单实现代码
发布时间:2024-09-22 04:04:17        浏览次数:0        返回列表

今天小编跟大家讲解下有关html5 css3网站菜单实现代码 ,相信小伙伴们对这个话题应该有所关注吧,小编也收集到了有关html5 css3网站菜单实现代码 的相关资料,希望小伙伴们看了有所帮助。

实现的难点在于:first-child,last-child 两个选择器 以后margin-left:-1px;的应用 33%,34%宽度的技巧处理。

另外一个难点是:box-shadow:1px 0 0 #F1F1F1 inset; 的实现。

最后是:复制代码代码如下:background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#b6b4b4));background:-moz-linear-gradient(top, #f9f9f9, #b6b4b4);background:-o-linear-gradient(top, #f9f9f9, #b6b4b4);background:linear-gradient(top, #f9f9f9, #b6b4b4);

复制代码代码如下: <!doctype html><html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"xml:lang="en"><head> <meta http-equiv="Content-Type"content="text/html;charset=UTF-8"/> <title>html5,css3菜单</title> <style type="text/css"> .jikey_demo{ width:80%; margin:0 auto; background:#f1f1f1;} .news_info{margin-bottom:5px;border:1px solid #bbb;border-radius:5px;box-shadow:0 1px 0 #f1f1f1;} .news_info a{display:inline-block;width:33%;height:26px;font-family:"微软雅黑";line-height:26px;text-align:center;color:#555;border-right:1px solid #ccc;box-shadow:1px 0 0 #F1F1F1 inset;} .news_info a:first-child{width:33%;box-shadow:none;border-radius:4px 0 0 4px;} .news_info a:last-child{width:34%;border-right:none;margin-left:-2px;border-radius:0 4px 4px 0;} .news_info a:hover, .news_info a.current{color:#208edd;background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#b6b4b4));background:-moz-linear-gradient(top, #f9f9f9, #b6b4b4);background:-o-linear-gradient(top, #f9f9f9, #b6b4b4);background:linear-gradient(top, #f9f9f9, #b6b4b4);} </style></head><body><div class="jikey_demo"> <nav class="news_info"><a class="current"href="https://www.aidi.net.cn/news/">新闻1</a><a class=""href="https://www.aidi.net.cn/guide/">新闻2</a><a class=""href="https://www.aidi.net.cn/review/">新闻3</a></nav></div></body></html>

来源:爱蒂网