大一新生请教html基本操作

img


如何将1和平面设计做成图片的样子

你题目的解答代码如下:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title> 页面名称 </title>
<style type="text/css">
.d {
    position: relative;
    margin: 50px 0px;
    padding-left: 200px;
    width: 200px;
    height: 30px;
    line-height: 30px;
    background-color: #FC9;
    border: 2px solid #900;
    color: #900;
    font-size: 20px;
}
.d:before {
    content: "";
    position: absolute;
    top: -40px;
    left: 50px;
    z-index: -1;
    width: 100px;
    height: 100px;
    background-color: #FC9;
    border: 2px solid #900;
    border-radius: 100%;
}
.d:after {
    content: attr(data-number);
    position: absolute;
    top: -38px;
    left: 52px;
    z-index: 1;
    width: 100px;
    height: 100px;
    text-align: center;
    line-height: 100px;
    background-color: #FC9;
    border-radius: 100%;
}
</style> 
</head>
<body>

    <div class="d" data-number="1">平面设计</div>
    
</body>
</html>

img

如有帮助,望采纳!谢谢!