css+html实现自适应宽度的菜单学习
来源:互联网 发布:神庙升级数据 编辑:程序博客网 时间:2024/05/21 08:35
本文是利用css和html实现自适应于文本长度菜单。
实现后的效果图,如下:
实现代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>menu4.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--><style type="text/css">a{ display: block; height:38px; /* width:107px; */ /* line-height: 2; */ line-height: 38px; text-align: center; background: url(./c2.jpg) no-repeat 0px 0px; color:#d84700; font-size: 14px; weight:bold; text-decoration: none; padding-left: 18px; float:left; margin:5px;}a span{ display: block; background: url(./c2.jpg) no-repeat right 0px; padding-right: 20px;}a:hover{ background: url(./c2.jpg) no-repeat 0px -38px;}a:hover span{ background: url(./c2.jpg) no-repeat right -38px;}</style> </head> <body> <p><a href="#"><span>免费注册</span></a> <a href="#"><span>登入</span></a> <a href="#"><span>在网上开店</span></a></p> </body></html>
0 0
- css+html实现自适应宽度的菜单学习
- CSS实现自适应宽度
- html/CSS 容器宽度自适应
- 实现wordpress主题下拉菜单的宽度自适应
- css自适应宽度 多种方法实现宽度自适应的水平居中
- css自适应宽度 多种方法实现宽度自适应的水平居中
- css自适应宽度 多种方法实现宽度自适应的水平居中
- html css div自适应屏幕宽度,高度
- html css div自适应屏幕宽度,高度
- html css div自适应屏幕宽度,高度
- 圆角自适应宽度按钮的css实现
- WEB - CSS实现的最小宽度自适应居中
- 浅谈纯CSS实现自适应浏览器宽度的正方形
- HTML基础学习之 --网页的宽度、高度自适应
- 滑动门菜单--css自适应宽度滑动门菜单
- css+div+图片实现宽度自适应圆角框
- html css实现左右两列固定宽度中间自适应效果
- css判断不同分辨率显示不同宽度布局实现自适应宽度&css3 @media样式的使用
- 玛雅预言2012的误区
- 玛雅日历和2012年12月,whats的新政
- 灵媒阅读开始自学通灵
- new和delete(转载自jazmfg 文章中有链接)
- F5 Load Balance问答集
- css+html实现自适应宽度的菜单学习
- UVA - 784 Maze Exploration
- 灵活 - 本品系焦特布尔技术节
- 浏览器基准测试分析和数据
- 流行的Java框架 - 阿帕奇Ofbiz的阔叶商务部
- 百事帮跑腿服务有限公司
- 洛锡安巴士
- 洛杉矶湖人队的科比 - 布莱恩特,一个最大的
- 每月的星座运势,2011年1月