这个问题在这里已经有了答案:
CSS - 需要'三重'边界 1答案你好,我想在我的css双边框中填充不同的颜色。我知道使用两个边框是可能的。
#parent{ width:100px; height:100px; border:1px solid #000; display:flex; align-items:center; justify-content : center; background-color:red; } #child{ width:80px; height:80px; border:1px solid #000; background-color:#fff; }<div id="parent"> <div id="child"></div> </div> 但在这里,我想有一个单一的边界属性(单 <div>或任何其他元素)的解决方案。所以我用css double Property.Is有任何可能的方法来填补这个double_border上的颜色?#element{ width:100px; height:100px; border:10px double #000; }<div id="element"></div>请注意 : - 有人标记这是可能的重复Another.Just请您阅读Tagg之前的两个问题。 这个问题是不同的,在这个问题上,他要求为不同颜色的两个边框着色。但是在这里我想保留两个相同颜色的边框,我只是想在它们之间填充一些颜色。希望你能理解这个问题。
This question already has an answer here:
Css - Need 'triple' border 1 answerHello Guys I Would Like to Fill a Different Color in My css Double Border.I Know that it is Possible by Using Two Borders.
#parent{ width:100px; height:100px; border:1px solid #000; display:flex; align-items:center; justify-content : center; background-color:red; } #child{ width:80px; height:80px; border:1px solid #000; background-color:#fff; }<div id="parent"> <div id="child"></div> </div> But here I would like to have a solution with a single Border Property(Single <div> or any other Element).So I Used css double Property.Is there is any Possible way to fill color on this double_border?#element{ width:100px; height:100px; border:10px double #000; }<div id="element"></div>Please Note :- Somebody Tagged That This is Possible Duplicate of Another.Just Please Read Both of the Question before You Tagg. This question is different,on that question he is asking for color the the two borders with different color.but here I would like to keep two borders with same color,I just wanna to fill some color between them.hope you will understand the problem.
最满意答案
您也可以使用多个阴影框:
#element { width: 100px; height: 100px; box-shadow: 0 0 0 3px #000, 0 0 0 6px #f00, 0 0 0 9px #000; }<div id="element"></div>You could also use multiple box-shadows:
#element { width: 100px; height: 100px; box-shadow: 0 0 0 3px #000, 0 0 0 6px #f00, 0 0 0 9px #000; }<div id="element"></div>
更多推荐
发布评论