一个简单的圆角效果问题,请各位大侠解释。

岩-悠然 2013-11-21 10:20:13
我想做圆角效果,有两个图片:top.gif是上面的圆角图像,bottom.gif 是下面的圆角图形,如果写这样的代码:
<html>
<head>
<style type="text/css">
.box{width:418px; background: #EFFCE7 url(bottom.gif) no-repeat left bottom;}
.box h2{background:url(top.gif) no-repeat left top;}
</style>
</head>
<body>
<div class="box">
<h2>
dfdsfd
</h2>
<p>
ddddd
</p>
</div>
</body>
<html>
没有问题,为什么改成这样的代码就有问题呢?
<html>
<head>
<style type="text/css">
.box{width:418px; border:1px solid red; background: #EFFCE7 url(bottom.gif) no-repeat left bottom;}
.box h2{background:url(top.gif) no-repeat left top;}
</style>
</head>
<body>
<div class="box">
<h2>
dfdsfd
</h2>
<p>
ddddd
</p>
</div>
</body>
<html>

好像是ie浏览器没事,google浏览器不行。
...全文
86 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
取个昵称不难 2013-11-21
  • 打赏
  • 举报
回复
建议使用css3的圆角属性 box-radius
追云人 2013-11-21
  • 打赏
  • 举报
回复
有没显示效果的图片看看

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧