gpt4 book ai didi

css - IE 中的圆 Angular div(6/7)

转载 作者:行者123 更新时间:2023-11-28 03:55:43 24 4
gpt4 key购买 nike

这是圆 Angular div 的代码。除 IE(6/7) 外,一切正常,即使在 IE(8/9) 中也很好,显然其他浏览器在圆形 div 上看起来不错。稍后在代码后描述。

html代码:

<div id="tweets">
<div id="tweets_text">
<div id="tweets_text_top">
<div id="tweets_top_left">
</div><!--#tweets_text_left-->
<div id="tweets_top_right">
</div><!--#tweets_text_right-->
</div><!--#tweets_text_top-->
<div id="tweets_text_middle">
TeXt HeRe....
</div><!--#tweets_middle-->
<div id="tweets_text_bottom">
<div id="tweets_bottom_left">
</div><!--#tweets_text_left-->
<div id="tweets_bottom_right">
</div><!--#tweets_text_right-->
</div><!--#tweets_text_bottom-->
</div><!--#tweets_text-->
</div><!--#tweets-->

CSS 代码:

#tweets{
clear: both;
margin-bottom: 10px;
padding: 0px;
border: 0px;
}
#tweets_text{
width:214px;
clear: both;
margin: 0px;
padding: 0px;
border: 0px;
background: #141414;
}
#tweets_text_top, #tweets_text_bottom{
width: 214px;
height: 10px;
background: #000000;
clear: both;
}
#tweets_top_left{
height: 10px;
width: 10px;
background: url('images/top_left.jpg') no-repeat;
float: left;
clear: left;
}
#tweets_top_right{
height: 10px;
width: 10px;
background: url('images/top_right.jpg') no-repeat;
float: right;
clear: right;
}
#tweets_bottom_left{
height: 10px;
width: 10px;
background: url('images/bottom_left.jpg') no-repeat;
float: left;
clear: left;
}
#tweets_bottom_right{
height: 10px;
width: 10px;
background: url('images/bottom_right.jpg') no-repeat;
float: right;
clear: right;
}
#tweets_text_middle{
width: 200px;
padding: 7px;
background: #000000;
color: #f4f4f4;
font-size: 12px;
}

图片在这里: rounded div's images

现在它只出现在 IE(6/7) 中。底部不像顶部那样圆润。如果你测试,希望你能找到我要求的。如果有人能找到错误,我将不胜感激。

如果您在理解或获取文档时遇到任何问题,请告诉我。

谢谢。

最佳答案

这是一个非常流行的 jQuery 圆 Angular 插件。

http://jquery.malsup.com/corner/

所有浏览器都支持它,包括 IE6。它使用嵌套的 div(不是图像)在 IE 中绘制 Angular 。它在支持它的浏览器(Opera 10.5+、Firefox、Safari 和 Chrome)中也有原生的边界半径舍入。所以在那些浏览器中,插件只是设置一个 css 属性。

这里是如何使用它

您需要在 </body> 之前包含 jQuery 和 Corner js 脚本.然后像 $('div, p').corner('10px'); 这样写你的 jQuery并放在''之前。所以你的 html 看起来像下面的代码。在这里,我正在为所有 div 制作圆 Angular 和 p标签。如果你想为特定的 id 或类做这件事,那么你可以做类似 $('#myid').corner(); 的事情。

<body>
<div class="x"></div>
<p class="y"></p>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://github.com/malsup/corner/raw/master/jquery.corner.js?v2.11"></script>
<script>$('div, p').corner();</script>
</body>

http://jsfiddle.net/VLPpk/1 查看工作示例

关于css - IE 中的圆 Angular div(6/7),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5625125/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com