惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
L
LINUX DO - 热门话题
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
V
V2EX
GbyAI
GbyAI
量子位
Microsoft Azure Blog
Microsoft Azure Blog
有赞技术团队
有赞技术团队
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
B
Blog
Microsoft Security Blog
Microsoft Security Blog
S
SegmentFault 最新的问题
O
OpenAI News
N
News and Events Feed by Topic
博客园 - Franky
爱范儿
爱范儿
Forbes - Security
Forbes - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V2EX - 技术
V2EX - 技术
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Schneier on Security
Schneier on Security
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Recent Commits to openclaw:main
Recent Commits to openclaw:main
人人都是产品经理
人人都是产品经理
P
Privacy International News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
Last Week in AI
Last Week in AI
罗磊的独立博客
Spread Privacy
Spread Privacy
Recent Announcements
Recent Announcements
The Cloudflare Blog
Google DeepMind News
Google DeepMind News
AWS News Blog
AWS News Blog
The Register - Security
The Register - Security
Y
Y Combinator Blog
J
Java Code Geeks
I
Intezer

博客园 - 落叶潇潇雨

Can't get WebApplicationContext object from ContextRegistry.GetContext(): Resource handler for the 'web' protocol is not defined xml序列化与反序列化 Asp.net 导出Excel How to debug Typescript in browser log4net使用的关键点 DataContractSerializer序列化与反序列化遇到的奇怪问题 图文安装Windows Template Library - WTL Version 9.0 WCF的传输安全(读书笔记) Asp.net mvc 各个组件的分离 同程旅游网开放平台SDK开发完成 csdn回到顶端 SQL多行变一列 Timer的schedule和scheduleAtFixedRate方法的区别解析 android 主线程和子线程之间的消息传递 activity生命周期 瀑布流插件 ajaxFileUpload上传文件和表单数据 Ajax上传表单数据和文件 使用Rhino Mocks
CSS自适应宽度圆角按钮
落叶潇潇雨 · 2013-06-05 · via 博客园 - 落叶潇潇雨

CSS自适应宽度圆角按钮,背景图要使用满足最长按钮的宽度,然后通过两个标签a, span,一个通过背景图的左对齐,一个通过背景图的右对齐。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>CSS自适应宽度圆角按钮 @5key.net</title>
<style>
*
{margin:0; padding:0;}
body
{padding:10px; font-size:12px;}
h1
{margin:0; padding:10px 0; font-size:14px; font-weight:bold;}
a
{background:url(http://www.lanrentuku.com/down/js/images/12447749840.gif) left 0;  color:#fff; text-decoration:none; height:30px; float:left; cursor:hand; margin:0 5px 0 0;}
a:hover
{background:url(http://www.lanrentuku.com/down/js/images/12447749840.gif) left -30px;height:30px;}
a span
{background:url(http://www.lanrentuku.com/down/js/images/12447749840.gif) right 0;  padding:9px 8px 5px 0; margin:0 0 0 8px; float:left; height:16px;}
a:hover span
{background:url(http://www.lanrentuku.com/down/js/images/12447749840.gif) right -30px; color:#000;  padding:9px 8px 5px 0; margin:0 0 0 8px; height:16px;  }
</style>
</head>

<body>
<h1><strong>CSS自适应宽度圆角按钮 @5key.net 查找更多代码,请访问:懒人图库 www.lanrentuku.com </strong></h1>
<href="#"><span>首页</span></a>
<href="#"><span>不是首页</span></a>
<href="#"><span>他也许是首页</span></a>
<href="#"><span>但他一定不是首页</span></a>
<href="#"><span>好了,就这样把。别扯了~</span></a>
</div>
</body>
</html>