让前端飞web

《精通CSS:高级Web标准解决方案》 知识点汇总

2018-11-01  本文已影响15人  Nian糕
Unsplash
a:visited:hover {color:#fff};
a:hover, a:focus, a:active {text-decoration: underline;}
a:link, a:visited {text-decoration: none;}
a:link, a:visited {
    text-decoration: none;
    font-weight: bolder;
}
a:hover, a:focus, a:active {
    text-decoration: underline;
    font-weight: bolder;
}
.box {
    border: 1px solid #000;
    width:calc(100%-2px);
}
li:nth-child(odd)
li:nth0child(even)
.box_1 p:nth-child(2) {
    color: red;
}
.box_2 p:nth-of-type(2) {
    color: red;
}

<section class="box_1">
    <p>我一直在寻找不停奔跑</p>
    <p>跨过山间和海的问号</p>
</section>
<section class="box_2">
    <p>穿越苦涩只为和你拥抱</p>
    <p>微笑煎熬最后的美好</p>
</section>
运行结果_1
.box_1 p:nth-child(2) {
    color: red;
}
.box_2 p:nth-of-type(2) {
    color: red;
}

<section class="box_1">
    <span>追梦的蚂蚁</span>
    <p>我一直在寻找不停奔跑</p>
    <p>跨过山间和海的问号</p>
</section>
<section class="box_2">
    <span>追梦的蚂蚁</span>
    <p>穿越苦涩只为和你拥抱</p>
    <p>微笑煎熬最后的美好</p>
</section>
运行结果_2
background-image: linear-gradient(black, blue);
background-image: linear-gradient(-45deg, black 0%, blue 20%, red 50%);
background-image: radial-gradient(at 400px 400px, black, white);
background-image:  radial-gradient( ellipse 200px 100px at 100px 10px,  black, white);
background-image: radial-gradient(circle 200px at 0 100%, blue, orange);
box-shadow: 0 0 10px blue;
-webkit-box-reflect: below 20px;
-webkit-mask-image: linear-gradient(rgba(123,123,1,1) 20%, rgba(122,0,34,0.2));
-webkit-mask-image: url(./img/mask.png);
-webkit-mask-repeat: no-repeat;
运行结果
div {
    border-top: 1px solid red;
    border-left: 1px solid red;
    width: 40px;
    height: 40px;
    -webkit-transform: rotate(135deg);
    transform: rotate(135deg);
}
<a href="tel:18897778730">18897778730</a>
<a href="sms:10086">10086</a>
<a href="mailto:abc@qq.com">邮件</a>

本篇的内容到这里就全部结束了,常用的 CSS 样式重置文件我已经发到了 GitHub Reset.css,本篇文章知识点来源 精通CSS:高级Web标准解决方案(第2版).pdfCSS速查总表 已上传至百度网盘,有需要的同学可自行下载

End of File

行文过程中出现错误或不妥之处在所难免,希望大家能够给予指正,以免误导更多人,最后,如果你觉得我的文章写的还不错,希望能够点一下喜欢关注,为了我能早日成为简书优秀作者献上一发助攻吧,谢谢!^ ^

上一篇 下一篇

猜你喜欢

热点阅读