在Safari中渲染边框半径不同的边框宽度和颜色时出现问题,可以尝试以下解决方法:
div {
box-shadow: 0 0 0 2px red;
}
div {
position: relative;
}
div::before {
content: "";
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
border: 2px solid red;
}
div {
background-image: url(border.png);
background-size: cover;
background-repeat: no-repeat;
}
以上是几种可能的解决方法,具体选择哪种方法取决于具体情况和需求。在实际使用中,可以根据需要进行尝试和调整。
上一篇:边框半径不生效
下一篇:边框半径的填充与图片重叠