简体   繁体   English

有什么建议可以将此圆形框设计为CSS?

[英]Any suggestions for making this rounded box design to CSS?

I have the CSS for the basic design of this rounded box. 我有这个圆形框的基本设计的CSS。 I have pasted that below. 我已经在下面粘贴了。 I'm trying to add a blue border with the following design effect (please see image below). 我正在尝试添加具有以下设计效果的蓝色边框(请参见下图)。 Firstly is this possible? 首先这可能吗? If so, any suggestions would be great.. 如果是这样,任何建议都会很棒。

I tried adding just a top border, but it doesn't quite give it the effect i'm looking for. 我尝试仅添加顶部边框,但并不能完全满足我所寻找的效果。

我想要的是蓝色顶部边框设计。

.contentbox {
  border-style: solid;
  border-width: 2px;
  border-color: rgb(54, 81, 143);
  border-radius: 10px;
  background-color: rgb(255, 255, 255);
  opacity: 0.2;
  box-shadow: inset 0px -8px 0px 0px rgba(54, 81, 143, 0.03);
  position: absolute;
  left: 190px;
  top: 324px;
  width: 100%;
  height: 524px;
  z-index: 118;
}

This Codepen uses different border widths to create a similar effect to what is pictured in the example. 该Codepen使用不同的边框宽度来创建与示例中所示效果相似的效果。

Good luck, and I hope this helps. 祝您好运,希望对您有所帮助。

 html, body { perspective: 100px; height: 100%; width: 100%; margin: 0; } div { margin: 20px; border-style: solid; border-width: 4px 1px 1px 1px; border-color: rgb(54, 81, 143); border-top-color: blue; border-radius: 10px; background-color: rgb(255, 255, 255); box-shadow: inset 0px -8px 0px 0px rgba(54, 81, 143, 0.03); position: absolute; width: 100px; height: 100px; } 
 <div></div> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM