gpt4 book ai didi

CSS:使用框边框

转载 作者:太空宇宙 更新时间:2023-11-04 02:17:04 26 4
gpt4 key购买 nike

我正在尝试复制 this page 上的白框, 上面写着“你的成功”。

body{
background-color:#DFDFDF;
}
.index_whitebox{
background-color: #fff;
height: 60%;
width: 25%;
position: absolute;
margin-left: 4%;
margin-bottom: 20px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 10px;
}
<div class="index_whitebox">
</div>

我假设没有 border-style 并且我使用 % 来实现移动兼容性。我似乎无法正确设置边界。

最佳答案

如果您查看“检查元素”,您实际上可以看到他们是如何编码的。我将他们使用的主要部分组合在一起,因为一些使用 CSS 文件,而另一些则是内联的。

.class1 {
left: 1px;
width: 302px;
position: absolute;
top: 445px;
height: 378px;
}

.class2 {
left: 1px;
width: 302px;
position: absolute;
top: 445px;
height: 378px;
}

.class3{
border: 2px solid rgba(255, 255, 255, 1);
background-color: rgba(255, 255, 255, 1);
border-radius: 5px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

都在这里:

enter image description here

关于CSS:使用框边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38739783/

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