gpt4 book ai didi

css - 如何在超厚和多色边框周围创建超薄边框(黑色)

转载 作者:太空宇宙 更新时间:2023-11-03 23:34:01 26 4
gpt4 key购买 nike

我想加一个超细的黑边
在这个环的边界上方和下方。

http://jsfiddle.net/PUBqA/5/

目标是让这个戒指容易看
在白色背景上。

唯一的方法就是添加一些薄的
环外环内黑色边框。

这是我目前的代码:

CSS:

#ring{
width:250px;
height:250px;
border:100px solid black;
border-color: red blue green yellow;
border-radius: 50%;
}

html:

<div id="ring"></div>

最佳答案

尝试在您的代码中这样添加:

DEMO

#ring{
box-shadow:0 0 0 10px #000, 0 0 0 10px #000 inset;
-khtml-box-shadow: 0 0 0 10px #000, 0 0 0 10px #000 inset;
-moz-box-shadow: 0 0 0 10px #000, 0 0 0 10px #000 inset;
-webkit-box-shadow: 0 0 0 10px #000, 0 0 0 10px #000 inset;
}

关于css - 如何在超厚和多色边框周围创建超薄边框(黑色),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24569815/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com