昨天看教程,出的这么一个作业,对于会的肯定不难,其实主要是思路,还有边框透明的设置,记录下代码吧:

<html>
<head>
<title>css</title>
<style>
#border{
width:0px;
height:0px;
border:50px solid black;
border-top:50px solid transparent;
border-left:50px solid transparent;
border-right:50px solid transparent;
float:left;
}

#color{
width:500px;
height:500px;
background-color:red;
</style>
</head>
<body>
<div id=”border”>
</div>
<div id=”color”>
</div>
</body>
</html>

留下一个答复

Please enter your comment!
Please enter your name here