最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

CSS3了解过的样式记录_html/css

来源:动视网 责编:小采 时间:2020-11-27 16:39:19
文档

CSS3了解过的样式记录_html/css

CSS3了解过的样式记录_html/css_WEB-ITnose:一、CSS3边框 1、圆角border-radius border-radius:值越大,角越圆; div{ width:100px; height:100px; background-color:red; border-radius:10px; border-top-left-radius:20px;} border-top-left-
推荐度:
导读CSS3了解过的样式记录_html/css_WEB-ITnose:一、CSS3边框 1、圆角border-radius border-radius:值越大,角越圆; div{ width:100px; height:100px; background-color:red; border-radius:10px; border-top-left-radius:20px;} border-top-left-


一、CSS3边框

1、圆角border-radius

border-radius:值越大,角越圆;

div{ width:100px; height:100px; background-color:red; border-radius:10px; border-top-left-radius:20px;}
  • border-top-left-radius:2em;
  • border-top-right-radius:2em;
  • border-bottom-right-radius:2em;
  • border-bottom-left-radius:2em;
  • 也可以根据上面4个参数,单独设置某个角。

    2、阴影box-shadow

    div{  width:100px;  height:100px;  background-color:yellow;  box-shadow: 10px 10px 5px #d8d8d8;}

    box-shadow: h-shadow v-shadow blur spread color inset;

    h-shadow:水平向右偏移量;

    v-shadow:垂直向下偏移量;

    blur:模糊距离;

    spread:阴影尺寸;

    color:阴影颜色;

    inset:改为内阴影;

    3、边框图片 border-image

  • border-image-source 用在边框的图片的路径。
  • border-image-slice 图片边框向内偏移。
  • border-image-width 图片边框的宽度。
  • border-image-outset 边框图像区域超出边框的量。
  • border-image-repeat 图像边框是否应平铺(repeated)、铺满(rounded)或拉伸(stretched)。
  • 二、CSS3 背景

    1、background-size:控制背景图片的大小;

    background-size:20px 20px;

    2、background-origin:3个属性可选;

  • padding-box 背景图像相对于内边距框来定位。
  • border-box 背景图像相对于边框盒来定位。
  • content-box 背景图像相对于内容框来定位。
  • 3、background-clip:规定背景的绘制区域。

  • padding-box 背景图像相对于内边距框来定位。
  • border-box 背景图像相对于边框盒来定位。
  • content-box 背景图像相对于内容框来定位。
  • 另外在CSS3中,background-image:可以设置多张图片了。

    background-image:url(1.gif),url(2.gif);

    三、过渡transition

  • transition:简写属性,用于在一个属性中设置四个过渡属性。
  • transition-property:规定应用过渡的 CSS 属性的名称。
  • transition-duration:定义过渡效果花费的时间。默认是 0。
  • transition-timing-function:规定过渡效果的时间曲线。默认是 "ease"。
  • transition-delay:规定过渡效果何时开始。默认是 0。
  • 其中transition-timing-function过渡时间,有以下几种,你可以规定它过渡的速度。

  • linear 规定以相同速度开始至结束的过渡效果(等于 cubic-bezier(0,0,1,1))。
  • ease 规定慢速开始,然后变快,然后慢速结束的过渡效果(cubic-bezier(0.25,0.1,0.25,1))。
  • ease-in 规定以慢速开始的过渡效果(等于 cubic-bezier(0.42,0,1,1))。
  • ease-out 规定以慢速结束的过渡效果(等于 cubic-bezier(0,0,0.58,1))。
  • ease-in-out 规定以慢速开始和结束的过渡效果(等于 cubic-bezier(0.42,0,0.58,1))。
  • cubic-bezier(n,n,n,n) 在 cubic-bezier 函数中定义自己的值。可能的值是 0 至 1 之间的数值。
  •  

    鼠标移上3D转换360度。

    div:hover{ transform: rotateY(360deg); transition: transform 2s;}

    四、CSS动画

     飞啊飞

    以上是改变位置,并且一边移动一边旋转的动画。

     飞啊飞

    属性自己去查吧。太多。

    文档

    CSS3了解过的样式记录_html/css

    CSS3了解过的样式记录_html/css_WEB-ITnose:一、CSS3边框 1、圆角border-radius border-radius:值越大,角越圆; div{ width:100px; height:100px; background-color:red; border-radius:10px; border-top-left-radius:20px;} border-top-left-
    推荐度:
    标签: 样式 html css3
    • 热门焦点

    最新推荐

    猜你喜欢

    热门推荐

    专题
    Top