我有此图像,我想将此框分为三个部分,并且需要一个图例,就像它在图像中的样子一样。
以下是我到目前为止所做的代码,但实际上对垂直线(顶部和底部之间的空间)以及带有曲线边框的顶部图例不了解。
<!DOCTYPE html>
<html>
<head>
<style>
#rcorners2 {
border-radius: 25px;
border: 2px solid #73AD21;
padding: 20px;
width: 650px;
height: 150px;
}
</style>
</head>
<body>
<p id="rcorners2"></p>
</body>
</html>
我真的是HTML CSS的新手!请帮助我的代码!谢谢!
试试这个:
<html>
<head>
<style>
.wrapper {
width: 650px;
height: 150px;
position: relative;
}
.legend {
position: absolute;
height: 20px;
border-radius: 25px;
border: 2px solid #73AD21;
width: 30%;
top: 0;
background-color: white;
left: 35%;
}
#rcorners2 {
top: 10px;
position: relative;
display: flex;
border-radius: 25px;
border: 2px solid #73AD21;
padding-top: 20px;
padding-bottom: 20px;
width: 100%;
height: 150px;
box-sizing: border-box;
}
.line {
box-sizing: border-box;
height: 100%;
flex: 1 1 auto;
border-left: 2px solid green;
}
.line:first-child {
border-left: none;
}
</style>
</head>
<body>
<div class="wrapper">
<div id="rcorners2">
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
</div>
<div class="legend"></div>
</div>
</body>
</html>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句