html - 流体设计 - 边框半径 : 10px on an img

标签 html css

我正在与 DW:CC 合作,使用流体设计布局。我有一个 main_image,并且希望图像上的边框为圆形。这是我到目前为止所尝试过的:

<article class="fluid main_image hide_mobile">
    <img src="images/placeholder 3 to 2.jpg" alt=""/>
</article>

CSS:

.main_image {
    margin-top: 10px;
    border-radius: 10px;
}
.main_image img{
    overflow: hidden;
}

提示?

最佳答案

您只需将边框半径应用于 <img> .

.main_image img{
    overflow: hidden;
    border-radius: 10px;
}

关于html - 流体设计 - 边框半径 : 10px on an img,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20290234/

相关文章:

html - 我将如何使用 BEM 命名这些嵌套元素?

html - XSLT 按属性值排序

javascript - 使用 Rails 上传文件?

javascript - 如何在 slider 容器中安装元素

html - CSS Masonry 布局 - 列数不会改变

html - Div 未在父容器中正确定位

css - 如何使固定的 div x 可滚动

css - 溢出 : scroll is not working in my electron app

css - <mark> 顺风文本

CSS : Issue with parent class