|
@@ -0,0 +1,38 @@
|
|
|
+<!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>
|
|
|
+ .box{
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+ background-color:red;
|
|
|
+ /* 块元素转行元素 */
|
|
|
+ display: inline;
|
|
|
+ }
|
|
|
+ .span1{
|
|
|
+ height: 100px;
|
|
|
+ width: 100px;
|
|
|
+ background-color: blue;
|
|
|
+ /* 块元素转换行元素 */
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .span2{
|
|
|
+ background-color: yellow;
|
|
|
+ margin-top: 100px;
|
|
|
+ margin-right: 100px;
|
|
|
+ }
|
|
|
+ .span3{
|
|
|
+ background-color:purple;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <div class="box">world</div>
|
|
|
+ <span class="span1">hello</span>
|
|
|
+ <span class="span2">你好</span>
|
|
|
+ <span class="span3">世界</span>
|
|
|
+</body>
|
|
|
+</html>
|