• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
00fairy00の学习园地
博客园    首页    新随笔    联系   管理    订阅  订阅
NO.62 让带圆角的button自适应宽度
<!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=utf-8" />
<link type="text/css" rel="stylesheet" href="http://image.yihaodianimg.com/statics/global/css/global_site_base.css?142723">
<title>无标题文档</title>
<style type="text/css">
button
{border:none;background:none;width:auto;overflow:visible;text-align:center;white-space:nowrap;height:37px;line-height:37px;}
button span, button em
{display:block;height:37px;line-height:37px;color:#954b05;}    
button span
{padding-left:20px;background:url(bn_bg.png) no-repeat 0 -150px;}    
button em
{font-style:normal;padding-right:20px;background:url(bn_bg.png) no-repeat 100% -150px; color:#FFF;}
</style>
</head>

<body>

<button><span><em>按钮啊按钮啊</em></span></button>

</body>
</html>
posted on 2011-08-03 16:12  00fairy00  阅读(931)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3