day07

作者: Rosemarry丶 | 来源:发表于2017-11-03 19:27 被阅读0次

A我今天学了什么

1实现一个下拉菜单

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        ul li{
            list-style: none;
        }
        a{
            text-decoration: none;
            background-color: palevioletred;
            display: block;
        }
        li{
            width: 80px;
            height: 50px;
            text-align: center;
            line-height: 50px;
            display: block;
            float: left;
        }
        .three{
            display: none;
        }
        a:hover{
            background-color: aqua;
        }
        .three>a:hover{
            background-color: #f56600;
        }
        .two:hover .three{
            display: block;
        }
    </style>
</head>
<body>
<ul class="one">
    <li class="two">
        <a href="#">首页一</a>
        <div class="three">
            <a href="#">首页二</a>
            <a href="#">首页三</a>
            <a href="#">首页四</a>
        </div>
    </li>
    <li><a href="#">首页五</a></li>
    <li><a href="#">首页六</a></li>
</ul>
</body>
</html>

2width的继承问题

给父级相对定位,子级绝对定位,子级不会继承父元素的宽度

3css3常用样式的讲解

2.1.边框border-radius 可以将边框设置为圆角
border-radius:value 四个边都会改变
可以单独改变一边
border-top-left-radius: value;
border-top-right-radius:value;
border-bottom-left-radius:value;
border-bottom-right-radius:value;

2.2.box-shadow可以给元素添加阴影
box-shadow: h-shadow v-shadow blur spread color inset;
*h-shadow*
必需 水平阴影的位置。允许负值。
*v-shadow*
必需。垂直阴影的位置。允许负值。
*blur*
可选。模糊距离。
*spread*
可选。阴影的尺寸。
*color*
可选。阴影的颜色。请参阅 CSS 颜色值。
inset
可选。将外部阴影 (outset) 改为内部阴影。
2.3.文字效果
//设置文字的阴影
1 text-shadow: h-shadow v-shadow blur color;
//用的不多,但面试的时候碰到过
text-overflow 文本溢出属性指定如何显示溢出内容
p{
    overflow: hidden;
    text-overflow: ellipsis; 
    white-space:nowrap; 
    //white-space指定文字是否换行
}

B我掌握了什么

全部掌握

相关文章

网友评论

      本文标题:day07

      本文链接:https://www.haomeiwen.com/subject/xpqxmxtx.html