为了账号安全,请及时绑定邮箱和手机立即绑定

圆角边框为什么右边的圆角没有显示出来呢?

圆角边框为什么右边的圆角没有显示出来呢?

图像789 2016-03-20 10:37:24
<!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" /><title>无标题文档</title><style>.box{width:200px; margin:30px auto;}.boxHead{ background:url(headbackT.jpg) repeat-x; height:9px; overflow:hidden;}.boxHeadL{ background: url(headl.jpg) no-repeat;}.boxHeadR{ background: url(headbackr.jpg) no-repeat right:0; height:9px;}</style></head><body><div class="box"><div class="boxHead"><div class="boxHeadL"><div class="boxHeadR"></div></div></div></div></body></html>
查看完整描述

1 回答

已采纳
?
阿贾大魔王

TA贡献29条经验 获得超28个赞

你难道不觉得你的框架有问题吗?他们的关系不应该是这样吗:

<div class="box">
  <div class="boxHeadL"></div>
  <div class="boxHead"></div>
  <div class="boxHeadR"></div>
</div>

你那样一个包含一个的是什么鬼。

给每个div设置你需要的宽高,不要有的设了有的没设,很不规范;然后左浮动:float:left。

.box{width:200px; margin:30px auto;}
.boxHead{height:9px; width:160px; overflow:hidden; background:#000; float:left}
.boxHeadL{height:9px; width:20px; background:#F06; float:left}
.boxHeadR{height:9px; width:20px; background:#09C; float:left}

你想要边框圆角可以用border-radius:*px,不过兼容性差一些,在ie依然是直角

查看完整回答
反对 回复 2016-03-21
  • 图像789
    图像789
    都设置上宽度,内容多的话不是放不进去了么
  • 阿贾大魔王
    阿贾大魔王
    你要在边框上加内容吗?难道不是应该另写一个放内容的div跟在后面。你是怎么去分析布局的呢?框架没有想好吗?
  • 图像789
    图像789
    我自学了半个多月html/css,感觉自己总学不深,动手实践不行就总想重新学一遍理论
点击展开后面2
  • 1 回答
  • 0 关注
  • 1771 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信