html - 当我在 img 标签中使用类属性时,我看到边框也随之显示。如何消除边框
问题描述
我对图像使用 CSS 类。当我在 img 标签中使用 CSS 类时,我看到图像周围有边框。附上截图。我看到这张图片周围的边框
实际图片应该是这样的
这是CSS:
.bigDropArrow {
background-image: url(/assets/images/bigdroparrow.png)!important;
height: 35px;
width: 91px;
display: block;
background-repeat: no-repeat;
padding-bottom: -32px;
padding-right: -9px;
margin-left: 213px;
margin-top: -90px;
z-index: 1000;
border:0;
}
这是html:
<img class="bigDropArrow" alt="">
解决方案
我认为 :focus 或 :active 中的问题尝试添加并且您没有 src=" atttribute"
img {outline : none;}
或者
img:focus {outline : none;}
img:active {outline : none;}
推荐阅读
- excel - 使用(DAX、Powerpivot、Powerquery)计算 Excel 2019 中的每周平均值
- python - 如何在 PySimpleGUI 中一次获取同一帧内的图形和表格?
- laravel - I am trying to create a page or pages in laravel that shows a spefic client dashboard
- angular - How to bind data of multiselect dropdown of primeng Angular
- dockerfile - dockerfile pulling php7.4 instead installing it
- delphi - How to programmatically GET and SET the Input Language by WinAPI from Delphi?
- html - fontawesome icon not appear in place holder
- python - Pipenv 始终无法锁定并产生大量错误输出
- r - connecting to clickhouse in R
- stored-procedures - Record Type in BigQuery Stored procedure