html – 使用css显示为带圆圈的图像的图像
发布时间:2020-12-14 19:44:17 所属栏目:资源 来源:网络整理
导读:这是我的代码 – 这适用于chrome,firefox和safari ..我在 Windows 7上测试过它 但是在IE 8和Opera浏览器中,以下代码无效,而不是显示带圆圈的图像,而是以方形形式获取图像 div id="hotspot-img1-0" ul img class="proimg" src="http://profile.ak.fbcdn.net/h
这是我的代码 – 这适用于chrome,firefox和safari ..我在
Windows 7上测试过它
但是在IE 8和Opera浏览器中,以下代码无效,而不是显示带圆圈的图像,而是以方形形式获取图像 <div id="hotspot-img1-0"> <ul> <img class="proimg" src="http://profile.ak.fbcdn.net/hprofile-ak-snc4/276311_100002617687873_1118195351_n.jpg" title="web" style="width:100px;height:100px;background:#fff;border:2px solid #ccc;-moz-border-radius:52px;-webkit-border-radius:52px;"> </ul> </div> CSS #hotspot-img1-0{ top: 570px; left: 67px; height: 104px; width: 104px; border-top-left-radius: 52px; border-top-right-radius: 52px; border-bottom-right-radius: 52px; border-bottom-left-radius: 52px; box-shadow: 0px 2px 5px 0px; border-top-color: rgb(255,255,255); border-left-color: rgb(255,255); border-right-color: rgb(255,255); border-bottom-color: rgb(255,255); border-top-width: 2px; border-left-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid } 解决方法
@Sandhurst;坏标记写的第一件事就像这样:
<div> <ul> <li> <img class="proimg" src="http://profile.ak.fbcdn.net/hprofile-ak-snc4/276311_100002617687873_1118195351_n.jpg" title="web"> </li> </ul> </div> &安培;回答问题使用background-image而不是img: li{ background:url(image.jpg) no-repeat; -moz-border-radius:52px; -webkit-border-radius:52px; border-radius:52px; width:200px; height:200px; } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |