2023 11.30笔记

1. iconfont(可以选中改font-size和color)
   <link rel="stylesheet" href="../">  在head之间引入
   <button><i class="iconfont icon-sousuo"></i></button>  在body之间
   
2. css样式的继承:
   会继承的属性:字体属性、文本属性、文字颜色等
   不会继承:宽高、内外边距、嵌套的a链接等

3. transition-property: width height;  想要过渡的属性
   transition-duration: 3s;  过渡的时间
   transition-delay: 2s;  过几秒再过渡
   transition-timing-function: steps(40);  过渡速度(帧率),linear(匀速)
   transition: all 3s;  所有属性

4. div {
            width: 300px;
            height: 50px;
            background-color: pink;、
            animation-name: yz;
            animation-duration: 3s;
            animation-iteration-count: infinite;  次数(无限)
            animation-direction: alternate-reverse;  反转效果
            animation: yz 3s infinite alternate;  简写
       }
    @keyframes yz {  
           from {
                width: 300px;
                height: 50px;
                background-color: pink;
                }

            to {
                width: 600px;
                height: 300px;
                background-color: red;
               } 

            0% {
                width: 300px;
                height: 50px;
                background-color: pink;
                transform: rotate(45deg);
               }

            100% {
                width: 1200px;
                height: 300px;
                background-color: red;
                transform: rotate(345deg);
                }
                    }

5. 2d转换:(配合relative和absolute)
   以下都是给son(absolute)
   transform: translateX(100px);  移动
   transform: translateY(100px);
   transform: translate(100px, 100px);

   transform: rotateX(45deg);  旋转
   transform: rotateY(45deg);
   transform: translateX(100px) rotateX(45deg); 先移动后旋转

   transform: scaleX(0.5);  扩大和缩放
   transform: scaleY(0.5); 
   transform: scale(0.2);

   transform: skewX(45deg);  扭曲

6. 3d转换:(配合relative和absolute)

   给father(relative)
   transform-style: preserve-3d;
   perspective: 800px;

   给son(absolute)
   transform: translateZ(100px);
   transform: rotateZ(45deg);
   transform-origin: bottom;  以底为轴旋转(top px bottom)

7. text-shadow: 2px 2px 2px rgb(243, 8, 47);  文字阴影
                 X轴 Y轴 虚化 颜色
   box-shadow: 2px 2px 8px pink;  盒子阴影

8. 媒体查询

9. 渐变:
   background-image: linear-gradient(pink, green);

10.多列:(报纸)
    p {
        column-count: 2;  2列
        column-gap: 400px;  间隙
      }

11. 会旋转的盒子(见12代码)
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值