首页 > 其他分享 >css 不常用实用知识点

css 不常用实用知识点

时间:2022-11-22 18:00:52浏览次数:48  
标签:知识点 play rotate 7px solid 实用 animation border css

1,:target伪类与:hover、:link、:visited、:focus等伪类的用法一样

:target {color:blue}

<div class="box"> <a class="btn" href="#stop">stop</a> <a class="btn" href="#play">play</a> </div>

#stop:target ~ .animation { animation-play-state: paused; }

#play:target ~ .animation { animation-play-state: running; }

2,animation-play-state 状态可控制

.animation { width: 100px; height: 100px; margin: 50px auto; background: deeppink; animation: move 2s linear infinite alternate; }

.stop:hover ~ .animation { animation-play-state: paused; }

3,vmin,vmax,类似vh,vw

4,伪类实现loading

<div></div> 

body, html { height: 100%; overflow: hidden; }

div {

position: relative; width: 200px; height: 200px; border-radius: 50%; margin: 100px auto; transform: rotate(360deg);

animation: rotate 45s infinite linear; }

div::before {

position: absolute; content: "";

top: 0px;

left: 0px; right: 0px;

bottom: 0px; box-sizing: border-box;

border-radius: 50%; border-top: 3px solid #000;

border-left: 3px solid #000;

border-bottom: 3px solid transparent;

border-right: 3px solid transparent;

transform: rotate(720deg);

animation: rotate 3s infinite ease-out;

}

div::after {

position: absolute; content: "";

top: -2px; left: -2px; right: -2px;

 

bottom: -2px; box-sizing: border-box; border-radius: 50%;

border-bottom: 7px solid transparent; border-right: 7px solid transparent;

border-top: 7px solid #fff; border-left: 7px solid #fff; transform: rotate(720deg);

animation: rotate 3s infinite ease-in-out; }

@keyframes rotate { 100% { transform: rotate(0deg); } }

 

标签:知识点,play,rotate,7px,solid,实用,animation,border,css
From: https://www.cnblogs.com/zwjun/p/16915910.html

相关文章

  • Vue项目详情页:keep-alive与路由的关系、activated生命周期函数、递归组件、css渐变色
    CSS渐变色样式递归组件router-view是设置路由的,router-link是指定跳转到哪个页面的keep-alivekeep-alive会缓存组件, 保存组件的渲染状态。使用keep-alive包裹rou......
  • 实用工具(锐捷业务软件篇)
    大家好,我是小杜,又是元气满满的一天。这不,今天又是精神满满的来到了我的“战斗基地”-工位上,开始今天的学习战斗。从师傅那得知业务软件在部署的时候有几个很好用的工具,可以......
  • 实用工具(锐捷业务软件篇)
    大家好,我是小杜,又是元气满满的一天。这不,今天又是精神满满的来到了我的“战斗基地”-工位上,开始今天的学习战斗。从师傅那得知业务软件在部署的时候有几个很好用的工......
  • 直播电商平台开发,css实现超出部分显示省略号,控制文字
    直播电商平台开发,css实现超出部分显示省略号,控制文字 <divclass="content">css实现超出部分显示省略号,控制文字css实现超出部分显示省略号,控制文字</div> /*显示一行......
  • python基础知识点
    目录字典列表字典a={}a['you']=['a','b']a['me']=['c','d']print(a)输出结果:{'you':['a','b'],'me':['c','d']}列表print([2]+[3])输出结果......
  • 前端013-css-后台布局2-absolute定位
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>css后台布局</title><style>body{margin:0}/*去掉边框,*/.page-heade......
  • 读书笔记·深入解析CSS·第二部分
    浮动设计初衷浮动能将一个元素拉到容器的一侧,这样文档流就能包围它。双容器模式用于将内容居中。通过将内容放在两个嵌套的容器中,然后给内层的容器设置外边距,让它在外......
  • 前端012-css-后台布局1
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>css后台布局</title><style>body{margin:0}/*去掉边框,*/.page-heade......
  • css定位
    目录css/*手标悬浮下划线*/a:hover{text-decoration:underlinergb(84,181,84);}/*伪元素选择器,未访问过链接的颜色*/......
  • 合并多个js,css文件的方法:在服务端合并js和css文件
    合并所有的js和css文件可以减少HTTP请求,这样能提升访问速度。通常为了开发的方便,我们会把js按用途分类,这样就会有很多js文件,比如sablog的jscript文件夹里就有10几个文件,这......