[英]Border radius on focus for image inside anchor tag
I have this CSS:我有这个 CSS:
.sky:focus {border-radius: 25px; border: #000 solid 1px; outline: none}
& this HTML: &这个HTML:
<a class='sky' href='#'><img src='cloud.jpg'></a>
I wished a 25px border-radius on that focus , but it is not working.我希望该焦点上的边框半径为 25px,但它不起作用。 How to set border-radius on focus for the image inside an anchor tag?如何为锚标签内的图像设置边框半径?
Thank you in advance:)先感谢您:)
Solved by this, thank you Théo Benoit!解决了这个问题,谢谢Théo Benoit!
.sky:focus {background-color:#fff; border-radius: 5px; border: #000 solid 1px; display: inline-block; padding:2px;}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.