|
@@ -0,0 +1,61 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>Document</title>
|
|
|
+ <style>
|
|
|
+ .box1{
|
|
|
+ width: 400px;
|
|
|
+ height: 400px;
|
|
|
+ background-color: red;
|
|
|
+ /* border-radius: 200px; */
|
|
|
+ /* border-radius: 200px; */
|
|
|
+ /* 百分比相较于 父元素宽高 */
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
+ .box2{
|
|
|
+ width: 0px;
|
|
|
+ height: 0px;
|
|
|
+ /* background-color: blue; */
|
|
|
+ /* transparent 透明 */
|
|
|
+ border-top:50px solid transparent;
|
|
|
+ border-right:50px solid transparent;
|
|
|
+ border-bottom:50px solid yellow;
|
|
|
+ border-left:50px solid transparent;
|
|
|
+ }
|
|
|
+ .box3{
|
|
|
+ width: 200px;
|
|
|
+ height: 200px;
|
|
|
+ /* rgb(0,0,0) 三个值取值范围0-255 */
|
|
|
+ /* background-color: rgb(0,0,0); */
|
|
|
+ /* rgba(0,0,0,0) 三个值取值范围0-255 第四个值代表透明度 取值范围0-1 */
|
|
|
+ background-color: rgba(0,0,0,0.5);
|
|
|
+
|
|
|
+ }
|
|
|
+ .box4{
|
|
|
+ width: 200px;
|
|
|
+ height: 200px;
|
|
|
+ background-color: yellow;
|
|
|
+ }
|
|
|
+ .box5{
|
|
|
+ width: 0;
|
|
|
+ border:100px solid black
|
|
|
+ }
|
|
|
+ .box6{
|
|
|
+ width: 200px;
|
|
|
+ background-color: blue;
|
|
|
+ /* padding:100px 0; */
|
|
|
+ padding-top: 200px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <div class="box1"></div>
|
|
|
+ <div class="box2"></div>
|
|
|
+ <div class="box3"></div>
|
|
|
+ <div class="box4"></div>
|
|
|
+ <div class="box5"></div>
|
|
|
+ <div class="box6"></div>
|
|
|
+</body>
|
|
|
+</html>
|