HTML大爆炸

1、input标签输入框高亮边框

  outline:none;

2、去掉超链接下划线

  text-decoration: none;

3、文字加粗

  font-weight: bold;

4、设置字体

  font-family:courier;

5、ul横向排列,并去掉li前面的点

#ul li { 
float:left; 
list-style:none; 

6、父DIV中包含DIV(命名A)和DIV(命名B)

如果把A的宽度设置为100,B受到挤压,宽度占据剩余区域。

    <style type="text/css">
        #container {background: lightcyan;height: 40px;}
        #left{background: lightcoral;width:100px;height: 100%;float: left;}
        #right{background: lightgreen;height: 100%;width: auto;margin-left: 100px;}
    </style>
    <body>
                <div id="container">
            <div id="left"></div>
            <div id="right"></div>
        </div>
    </body>    

 7、移动设备适配

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"/>

8、光标手势

  cursor:default;  默认正常鼠标指针

  可选:hand文本选择  move移动选择效果 poiniter手指形状

9、元素水平局中

  如果被居中的元素是块级元素,则设置margin-left和margin-right分别为auto。

  如果被居中的元素是行内元素,则设置父节点:text-align: center。

  也可以如下:

  设置position: relative; left:50%;margin-left:-20ox;

posted @ 2015-09-08 13:34  Dalink  阅读(167)  评论(0编辑  收藏  举报