float 浮动小案例

Original 2019-03-12 14:43:34 232
abstract:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,
<!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">
<title>Document</title>

    <style>
        ul{
        list-style: none;
    }
    
    ul li {
        float: left;
        margin: 0 10px;
        background: pink;
    }
    </style>
</head>
<body>
    <ul>
        <li>Link one</li>
        <li>Link two</li>
        <li>Link three</li>
        <li>Link four</li>
    </ul>
    
 
</body>
</html>

float:left  左浮

float:right 右浮

clear:both 清除浮动



Correcting teacher:韦小宝Correction time:2019-03-12 16:01:07
Teacher's summary:写的很不错 基本上写起来应该没有什么太大的难度吧 导航基本上都是会用li来做的 方便控制每块的宽高

Release Notes

Popular Entries