html - 图片边框在 chrome 和 firefox 中消失,但在 IE 中出现

标签 html css jquery-ui google-chrome firefox

在图像周围添加边框使用

img
{
    border-color: #bbbbbb;
}

图像在 html 中定义为

    `<img src="/Thumb?product=CPU-EP0520EL01">`

根据浏览器图像属性,图像大小为 130x130 像素。在 Firefox 和 Chrome 中边框不会出现。

Firebug 检查元素样式选项卡显示样式已正确应用:

img {
    border-color: #BBBBBB;
}
.category-list li a, ul#category-list li .button {
    font-size: 11px;
}
a:link, a:visited {
    color: #A80000;
    font-weight: bold;
}
.category-list li {
    text-align: center;
}
.category-list {
    list-style: none outside none;
}
body {
    font-family: Helvetica,Arial,sans-serif;
    font-size: 12px;
} 

在 Internet Explorer 9 中,边框显示正确。 使用 Jquery ui 默认 STLye。我将 ui-corner-all 类添加到 img 元素,但问题仍然存在:未显示边框。 (在这种情况下,IE9 可以正确显示圆 Angular 边框)。

如何在 Chrome 和 FireFox 中显示图像周围的圆 Angular 边框?

最佳答案

正确的使用方法是

img{
border:1px solid #bbb;
}

其中第一个参数定义边框的宽度,第二个参数定义边框的类型,第三个参数是边框的颜色。 您可以阅读有关边框的信息 here

关于html - 图片边框在 chrome 和 firefox 中消失,但在 IE 中出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14802841/

相关文章:

javascript - 由 Knockout JS 支持的 Accordion 内部 JQuery UI 可排序的困难

android - 如何在android中合并音频和视频文件

jquery - 如何仅在访问者第一次访问我的网站时显示弹出窗口?

javascript - sass 文件上的 CSS 转换和动画不起作用

css - Woocommerce:如何制作 woocommerce_form_field 内联 block

jquery - 如何设置非 Widget 元素(如 jQuery 小部件)的样式

html - 不透明度如何影响元素顺序?

html - 如何保存我在 SharePoint 2013 中使用 Internet Explorer 开发人员工具所做的 HTML 更改?

html - Bootstrap 将一张大图像与四张小图像对齐

javascript - jQuery UI 拖动 div 不起作用