如何在CSS中删除图像边框? [英] How remove border around image in css?
本文介绍了如何在CSS中删除图像边框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在鼠标光标位于帮助图标上时显示范围。
它可以工作,但是,我无法删除
我的CSS:
.info {
位置:绝对;
border:none;
}
a.info {
position:absolute;
z-index:24;
背景:无;
颜色:#000;
text-decoration:none
}
a.info:hover {
z-index:25;
背景颜色:#FFF;
cursor:help;
}
a.info span {b $ b display:none
}
a.info:hover span {
display :块;
位置:绝对;
cursor:help;
bottom:0px;
left:26px;
width:150px;
padding:4px;
$ / code>
cd
解决方案
试试这个:
img {border:0;}
code>
您也可以限制范围,只删除一些图片的边框:
.myClass img {border:0;}
有关边框CSS属性的更多信息可以在此处找到。
编辑:将边框从 0px
更改为 0
。正如注释中所解释的, px
对于 0
单元是多余的。
I try to display a span when the cursor of the mouse is on a help icon.
It works, but nevertheless, I don't manage to remove the border around the icon.
My CSS :
.info{
position:absolute;
border:none;
}
a.info{
position:absolute;
z-index:24;
background:none;
color:#000;
text-decoration:none
}
a.info:hover{
z-index:25;
background-color:#FFF;
cursor:help;
}
a.info span{
display: none
}
a.info:hover span{
display:block;
position:absolute;
cursor:help;
bottom:0px;
left:26px;
width:150px;
padding:4px;
}
cd
解决方案
Try this:
img{border:0;}
You can also limitate the scope and only remove border on some images by doing so:
.myClass img{border:0;}
More information about the border css property can by found here.
Edit: Changed border from 0px
to 0
. As explained in comments, px
is redundant for a unit of 0
.
这篇关于如何在CSS中删除图像边框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文