层叠样式表,用来显示HTML或者XML等文件样式的计算机语言。网页显示与内容星散的样式设计语言,能够对网页中工具排版举行像素级正确控制,险些支持所有字体字号,拥有对网页工具和模子样式编辑能力,并能举行开端交互设计
<a>Hello</a>
<style type="text/css">
a {font-size:40px;
color:#345cff;
}
</style>
a {font-size:40px;
color:#00ff29;
}
<link rel="stylesheet" type="text/css" href="/go/?url=a.css" class="target" rel="external nofollow">
<style type="text/css">
a {
font-size: 40px;
color: #345cff;
}
</style>
<!-- a, p, * -->
<!--class是一个全局属性-->
.class1 {}
#id1 {}
[href] {}
[href=a.html] {}
a:hover {} <!--当鼠标经过时的样式-->
选择器1,选择器2
选择器1 子标签选择器
border-width: 5px; <!--边框宽度--> border-color: #345cff; <!--边框颜色--> border-style: solid; <!--边框线型--> border-top-color: #fff314; <!--单边边框颜色--> border-radius: 15px/20px; <!--圆角边框--> <!--简写--> border: 5px solid red; border-top: 10px hidden green; background-color: #fff314; <!--靠山颜色--> background-image: url(a.jpeg); <!--靠山图片--> background-repeat: <!--重复方式--> background-size: auto/contain/cover background-attachment: local/fixed/ float: left|right <!--浮动--> line-height <!--行高-->
text-align 对齐文本 direction 文本偏向 letter-spacing word-spacing line-spacing 字符间距,单词间距,行间距 text-indent 首行缩进 text-decoration 文本装饰 text-transform 文本大小写转换 font-family 字体名称 font-size 字体大小 font-style 字体样式italic,oblique font-variant 指定字母是否以小型大写字母显式small-caps font-weight 字体粗细 text-shadow 建立文本阴影 10px 10px 5px red 水平偏移 竖直偏移 模糊水平 颜色
li {
list-style-type: none; <!--不显示黑点-->
display: inline; <!--一行内显示-->
float: left; <!--菜单左悬浮-->
}
p:hover {
width
transition-delay: 1s; <!--延迟转变-->
transition-duration: 500ms; <!--转换连续的时间-->
-webkit-transition-duration: ; <!--使chrome和safari可以正常使用-->
-o-transition-duration: ; <!--opera-->
-moz- ; <!--firefox-->
-ms- ; <!--ie浏览器-->
transition-property: background-color <!--选择渐变的属性-->
transition-timing-function:linear/ease/ease-in/ease-out/ease-in-out
}
p:hover {
animation-duration: 500ms;
animation-delay: 200ms;
animation-name: xxx;
animation-iteration-count: infinite; <!--重复次数-->
animation-direction: alternate; <!--轮流正反向转变-->
animation-fill-mode: forwards; <!--停在最后的状态-->
}
@keyframes xxx {
from {
width: 150px;
}
50% {
}
75% {
}
to {
width: 200px;
background-color: #345fff;
}
}
p:hover {
transform:rotate(45deg);
transform:scale(1.5);
transform:scalex(1.5);
transform-origin: top right; <!--转换中心点-->
transform-origin: 20px 40px;
z-index: 1; <!--显示优先级,数字越大优先级越高-->
transition: <!--显示加载时间-->
}
块级标签,主要举行网页结构,会将其中子米素内容作为一个自力的整体存在
默认宽度是页面的宽度,默认高度没有
若是子米素设置了百分比的高或宽,是div的百分比
position: releative;
left: 50px;
position: absolute;
父级米素设置相对之后,子级米素相对父米素定位
position: fixed;
1.阿里云: 本站现在使用的是阿里云主机,平安/可靠/稳固。点击领取2000米代金券、领会最新阿里云产物的种种优惠流动点击进入
2.腾讯云: 提供云服务器、云数据库、云存储、视频与CDN、域名等服务。腾讯云各种产物的最新流动,优惠券领取点击进入
3.广告同盟: 整理了现在主流的广告同盟平台,若是你有流量,可以作为参考选择适合你的平台点击进入
链接: http://www.fly63.com/article/detial/1936