为图片添加圆角失效求助:border-radius位置是否正确?
Fixing the Border-Radius Not Working Issue
The problem here is a syntax error in your inline CSS — you’re missing a semicolon (;) after the border:0 property. CSS requires each property-value pair to end with a semicolon (the last one is optional, but it’s good practice to include it), otherwise the browser can’t parse the subsequent properties correctly.
Corrected Code:
<p style="margin-bottom:0px"> <a href="Unpublisthed Website" target="_blank"> <img border="0" src="Unpublished Photo" alt="Photo" width="124" style="max-width:124px; height:auto; border:0; border-radius:20px"> <br><br> </a> <span style="FONT-SIZE: 7pt; line-height: .8"> Click picture to view<br></span> <span style="FONT-SIZE: 7pt; line-height: 1.6"> introduction video.</span> </p>
Key Fixes & Cleanup Tips:
- Added a semicolon after
border:0to ensureborder-radius:20pxis recognized by the browser. - The
border="0"attribute on the<img>tag is redundant (you already haveborder:0in the inline style) — feel free to remove either one to simplify the code.
If the border-radius still doesn’t apply after fixing the syntax, use your browser’s dev tools to inspect the image element. This will let you check if any external CSS or parent element styles are overriding your inline border-radius property.
内容的提问来源于stack exchange,提问作者Fayz
相关产品推荐
相关产品推荐

