1.HTML+CSS写个8
感想: 有点缺陷。效果地址:https://codepen.io/flyingliao/pen/QobdyE
HTML code:
<div class="eight">
<span><span></span></span>
<span></span>
</div>
CSS code:
html, body ,.eight{
margin:;
padding:;
}
body{
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.eight{
width: 80px;
height: 160px;
}
.eight>span{
display: block;
width: 100%;
height: 50%;
border: 1px solid white;
border-radius: 50%;
transform: rotate(-45deg);
}
.eight span:first-child{
/* alternate: 动画轮流反向播放 ;
forwards: 动画完成保持最后一个属性值;
animation-name: write1;
animation-duration: 2s;
animation-timing-function: ease-in;
animation-iteration-count:1;
animation-fill-mode: forwards;
*/
animation: write1 2s ease-in 1 forwards;
}
.eight span:last-child{
margin-top: -1px;
animation: write2 4s ease-in 2s forwards;
}
.eight>span:first-child>span{
position: absolute;
top:;
left:;
width: 80px;
height: 80px;
border: 1px solid white;
border-radius: 50%;
transform: rotate(-deg45);
animation: write3 2s ease-in 3s forwards;
}
@keyframes write1{
0%{
border-top-color: white;
border-left-color: white;
}
100%{
border-top-color: red;
border-left-color: red;
}
}
@keyframes write2{
0%{
border-right-color: white;
}
25%{
border-right-color: red;
}
50%{
border-right-color: red;
border-bottom-color: red;
}
75%{
border-right-color: red;
border-bottom-color: red;
border-left-color: red;
}
100%{
border-color: red;
}
}
@keyframes write3{
0%{
border-bottom-color: white;
border-right-color: white;
}
100%{
border-bottom-color: red;
border-right-color: red;
}
}
1.HTML+CSS写个8的更多相关文章
- CSS Icon 项目地址 小图标-用css写成的
http://cssicon.space/#/icon/focus 这是所有用css写成的 小图标 右侧有 html和css代码
- css写出0.5px边框(一)
在移动端会出现线条太粗的现象,简单来说,是因为手机端的像素单位和ui的图比例是2:1,所以ui图的1px边框对我们来说就是0.5px,但是浏览器渲染的最小单位就是1px,下面给几种方法用css写出0. ...
- 纯CSS写三角形-border法
(1)有边框的三角形 我们来写下带边框的三角形. 如果是一个正方形,我们写边时,会用到border,但我们这里讨论的三角形本身就是border,不可能再给border添加border属性,所以我们需要 ...
- css写宽为30%的正方形
如何用纯css写一宽为30%的正方形,用到了padding属性: 会不会恍然大悟呢? <!DOCTYPE html> <html lang="en"> &l ...
- CSS Devices可以让你在线直接获取使用CSS写的Mobile外形。
CSS Devices可以让你在线直接获取使用CSS写的Mobile外形. CSS Devices 彩蛋爆料直击现场
- 还在为小三角形切图?使用纯CSS写一个简单的三角形
同学们,当美工给的设计图是这样: 或者这样: 我的内心其实是拒绝的-_-:但工作还得干,大部分同学会写 <style> .icon{width:20px;height:20px;displ ...
- css写出三角形(兼容IE)
css写出三角形 利用css写三角形,兼容IE7 .arrow-up { width:0px; height:0px; border-left:10px solid transparent; bo ...
- CSS写的提示框(兼容火狐IE等各大浏览器)
项目上使用jQuery的Tooltip组件,在谷歌上正常,在火狐和IE下没有效果,所以根据谷歌的提示框单独用CSS写了个提示框,比较好的兼容了火狐和IE,且效果一样 原Tooltip代码: $('#d ...
- html+css写出类似word目录样式的内容
word目录的格式里这种很常见,要用html+css写出来刚开始还有点懵. 左右两边都是内容撑开宽度,中间内容的宽度也不是确定的,也是随着左右两边的内容动态变化的. 最终解决思路是,给右边内容加上白色 ...
- 纯css写带小三角对话框
在实际样式中经常会遇到要写类似对话框的样式,而这种样式往往会有一个小三角,如下所示: 那么如何用css写出来呢,其实很简单,先让父元素相对定位,然后运用css的伪类before或after.就可以写个 ...
随机推荐
- mysql官方测试 DB
https://dev.mysql.com/doc/employee/en/ http://blog.51cto.com/dnsliu/ http://blog.csdn.net/zengxuewen ...
- [InfluxDB] 安装与配置
[InfluxDB] 安装与配置 1- 下载 ubtuntu: wget https://dl.influxdata.com/influxdb/releases/influxdb_1.5.2_amd6 ...
- win2008 server 多IP配置
本人服务器环境 win8 + phpstudy 一个服务器多个IP 以前都是用linux,买了几套源码结果都是win8server 服务器+phpstudy. 渐渐也就随大流了.懒的去琢磨 一 ...
- linux找不到动态链接库 .so文件的解决方法
linux找不到动态链接库 .so文件的解决方法 如果使用自己手动生成的动态链接库.so文件,但是这个.so文件,没有加入库文件搜索路劲中,程序运行时可能会出现找不到动态链接库的情形. 可以通过ldd ...
- axios 上传图片
let data = new FormData(); for (var i = 0; i < files.length; i++) { let file = files.item(i); dat ...
- PyQt—QTableWidget中的checkBox状态判断
一.QTableWidget实现checkBox效果 利用QTableWidgetItem对象的CheckState属性,既能显示QCheckBox,又能读取状态 table = QtGui.QTab ...
- VisualSVNServer 无法启动 could not log pid to file
启动SVN时候报了错误,然后查看日志发现报了如下错误 VisualSVNServer.exe: could not log pid to file C:/Windows/ServiceProfiles ...
- pandoc 基本使用
pandoc –s 输入文件.后缀 –o 输出文件.后缀
- [转]SQL数据库查询到的汉字字段是乱码
使用英文版SQL数据库查询到的汉字字段是乱码的解决方案 2007-12-04 14:55:45 标签:函数 SQL 数据库 乱码 排序规则 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出 ...
- jQuery的html和css
jQuery每次返回的都是当前的集合对象: 每个方法用的时候都会把他的元素对象返回,他每次返回的都是最近的那个元素: 1.addclass() 备选元素添加一个类名 2.removeclass() 移 ...