返回css中浮动的......登陆

css中浮动的案例

阿涛2019-06-06 23:27:41315

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

<!DOCTYPE html>

<html>

<head>

    <meta charset="utf-8">

    <title>css中的浮动</title>

    <style type="text/css">

    /**{margin:0px;padding: 0px;}*/

        ul li{list-style: none;width: 100px;height: 40px;line-height: 40px;text-align: center;background: #ccc;float: left;margin: 0px 1px;}

        .box{width: 200px;height: 200px;background-color: pink;float:right;}

        .clear{clear: both;}

    </style>

 

</head>

<body>

<h1>css中的浮动</h1>

<ul>

    <li>html</li>

    <li>css</li>

    <li>JavaScript</li>

    <li>jQuery</li>

    <li>php</li>

</ul>

<div class="clear"></div>

<div class="box">div1</div>

<div class="box">div2</div>

<div class="box">div3</div>

</body>

</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送