ITPub博客

首页 > 应用开发 > > 为什么我这个不往右边挤了了呢

为什么我这个不往右边挤了了呢

作者:huzhizhong 时间:2019-10-12 13:49:29 0 删除 编辑

/* CSS Document */

body,div,dl,dt,dd,ul,li,ol,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,input,textarea{

    margin:0; 

    padding:0; 

    font-family:"Helvetica Neue", Helvetica, Arial,sans-serif;}

 

ol,ul,li{

    list-style:none;

}

 

a{

    text-decoration:none; 

    display:block; 

}

 

img{

    border:none;

    display:block;

}

 

.clearfloat:after{

    

    display:block;

    clear:both;

    content:"";

    visibility:hidden;

    height:0;

}

 

.clearfloat{

    zoom:1;

}

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

29

30

31

32

33

34

35

36

.index-menu .menu-list{

margin-top:150px;

color:#555;

overflow:hidden;

}

.index-menu .menu-list ul{

widht:1160px;

}

.index-menu .menu-item{

float:left;

width:520px;

margin-right:60px;

margin-bottom:56px;

}

.index-menu .menu-item .title,.index-menu .menu-item .line{

float:left;

}

.index-menu .menu-item .price{

float:right;

}

.index-menu .menu-item .title{

width:230px;

overflow:hidden;

white-space:nowrap;

text-overflow:ellipsis;

}

.index-menu .menu-item .comment{

margin-top:4px;

color:#b7b7b7;

font-size:12px;

}

.index-menu .menu-item .line{

margin-top:10px;

width:192px;

border-top:1px solid #e3e1e1;

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

        <divclass="public-container menu-list">

            <ulclass="clearfloat">

                <liclass="menu-item clearfloat">

                    <aclass="title">

                        <h4>Voluptate cillum fugiat.</h4>

                        <pclass="comment">Cheese, tomato, mushrooms, onions.</p>

                    </a>

                    <divclass="line"></div>

                    <divclass="price">$50</div>

                </li>

                

                <liclass="menu-item clearfloat">

                    <aclass="title">

                        <h4>Voluptate cillum fugiat.</h4>

                        <pclass="comment">Cheese, tomato, mushrooms, onions.</p>

                    </a>

                    <divclass="line"></div>

                    <divclass="price">$50</div>

                </li>

            </ul>

         </div>

两个应该是一个左边一个右边,但是不是横排排列。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1446/viewspace-3158142/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-04-15

  • 博文量
    107
  • 访问量
    921