|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
大佬们,我跟着视频上敲得浮动的代码但是运行起来却跟视频上的运行结果不一样,是为什么
下面是代码,我不会往上边放照片,有知道的大佬帮忙解决一下呗,看看我是哪写的不对。谢谢
<!DOCTYPE html>
<html>
<head>
<meta charset = "utf - 8">
<title></title>
</head>
<style type = "text/css">
.green {
width: "100px"; height: "100px";
background-color: green ;
float: left;
}
.red {
width: "200px"; height:"150px";
background-color: red;
}
.a {
width: "200px";
background-color: green;
}
.b {
width: "700px";
background-color: red;
}
.c {
width: "300px";
background-color: blue;
}
.a, .b, .c {
float: left; height: 200px;
}
</style>
<body>
<p>文字环绕效果</p>
<div class = "green"></div>
<div class = "red">文字环绕文字环绕文字环绕文字环绕</div>
<p>横向排版布局</p>
<div class = "a"></div>
<div class = "b"></div>
<div class = "c"></div>
</body>
</html>
应把 css 中的引号去掉。
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset = "utf - 8">
- <title></title>
- </head>
- <style type = "text/css">
- .green {
- width: 100px; height: 100px;
- background-color: green ;
- float: left;
- }
- .red {
- width: 200px; height: 150px;
- background-color: red;
- }
- .a {
- width: 200px;
- background-color: green;
- }
- .b {
- width: 700px;
- background-color: red;
- }
- .c {
- width: 300px;
- background-color: blue;
- }
- .a, .b, .c {
- float: left; height: 200px;
- }
- </style>
- <body>
- <p>文字环绕效果</p>
- <div class = "green"></div>
- <div class = "red">文字环绕文字环绕文字环绕文字环绕</div>
- <p>横向排版布局</p>
- <div class = "a"></div>
- <div class = "b"></div>
- <div class = "c"></div>
- </body>
- </html>
复制代码
|
|