浅谈html5标签css3的常用样式

2020-04-21 07:09:44易采站长站整理

font-size(大小)
font-family(字体系列)
font-style(字体样式)

字体颜色:
color
opacity (透明度 css3)

行距、对齐等:
line-height (行高)
text-align (对齐)
letter-spacing (字符间距)
text-decoration (文本修饰 )
overflow  超出的部分隐藏
text-overflow

text-overflow文本裁剪  clip裁剪文本时不添加…  ellipsis 裁剪时加…  注意:不换行和over-flow控制

text-shadow 阴影
text-indent

背景属性:
background (缩写形式)
background-color(背景色 )
background-image(背景图 )
background-repeat(背景图重复方式 )
background-position(位置坐标、偏移量)

列表常用

list-style: none无风格 disc实心圆 circle空心圆 square 实心正方形 decimal 数字

盒子属性:
margin(外边距/边界)    以上方为主 可写1、2、4个值
border(边框)
padding(内边距/填充 )

后可加 -top 等方向

border-radius 边框圆角

box-shadow  阴影

变形效果:transform

transform-origin 指定变换的起点

none无变换

translate(长度值或百分比) translateX translateY 在水平、垂直方向平移

scale(数值)scaleX scaleY 在水平方向、垂直方向或两个方向上缩放

rotate(角度)旋转元素

skew(角度)skewX skewY  在水平方向、垂直方向或两个方向上使元素倾斜一定的角度

matrix 自定义

过渡效果:transition

transition-property 指定过渡的css属性 默认值 all

transition-duration 完成过渡的时间

transition-timing-function 指定过渡函数  缓动效果默认值ease 等同于(0.25, 0.1, 0.25, 1.0)

transition-delay 指定过渡开始出现的延迟时间

@keyframes:定义一个动画

animation

CSS Code复制内容到剪贴板

<style>             
  .t5{   
            transition: 5s ease-out all;   /*过渡   ease    in 加速   out减速*/  
        }/*transition-delay延迟*/  
        .t5:hover{   
  
            transform: skew(45deg,45deg)   
        }   
        @keyframes key {   
            0%{   
                background-color: red;width: 200px;height: 200px;