问题描述
我一直在努力在CSS中复制像素完美的边框/斜角,这似乎很简单。我希望代码尽可能少并且尽可能简单,但是它变得过于复杂,同时仍然无法完全实现我的目标。
原始图片来自2000年代初期,由桌子和图像背景制成。我以为这对CSS来说是一件容易的事,但是我越喜欢它,它就会变得越复杂。
有人可以帮助解决这一挑战吗?
h1,h2,h3 {
margin: 0;
padding: 3px;
line-height: 1rem;
font-size: 1rem;
}
.Box {
margin-top: 20px;
background-color: #6487db;
border: 1px solid black;
border-radius: 6px;
}
.Box-content {
background-color: #E1E7F6;
border: 1px solid black;
margin: 2px;
margin-top: 0;
margin-bottom: 3px;
}
.Box h2 {
padding-left: 6px;
border: 2px solid;
border-top-color: #90abeb;
border-bottom-color: #486cc2;
border-left-color: #90abeb;
border-right-color: #486cc2;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
background-color: #6487db;
text-transform: uppercase;
color: #e5ebf9;
font-family: 'Orbitron';
letter-spacing: 0.02rem;
text-shadow: 2px 2px 1px #3c57b0;
}
.Box h3 {
padding-left: 8px;
padding-bottom: 0;
margin-top: 2px;
color: #162770;
font-family: trebuchet ms;
font-weight: 900;
}
.Box .text {
padding: 3px;
padding-top: 0;
padding-left: 8px;
line-height: 14px;
}
<div class="Box">
<h2>Title</h2>
<div class="Box-content">
<h3>Welcome</h3>
<div class="text">This is some text.</div>
</div>
</div>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)