非原创,使用html5做的旋转的太极图
来源:互联网 发布:湖南网络公关公司 编辑:程序博客网 时间:2024/06/07 21:12
<!DOCTYPE html>
<html>
<head>
<title>渐变太极图</title>
<meta charset="utf-8"><!--网页用的文字:UTF-8 万国码 -->
<meta name="keywords" content="">
<meta name="description" content="这是一个旋转的太极图,颜色有黑白两色"><!--网页传单:打广告的-->
<style>/*修饰某一区域或元素的宽,高,颜色,位置……*/
. { /*通配符选择器:选中所有元素*/
margin: 0px; /*清除浏览器默认的外边距*/
}
body {
background-color: #ccc;
}
.taichi { /*找到以class命名的叫做taichi的元素*/
/*修饰内容区*/
width: 400px; /*属性名称:属性值*/
height: 400px;
/*background-color:#6600ff;*//*给元素设置一种颜色*/
/*外边距:margin*/
margin: 100px auto 0px auto; /*外边距:上右下左*/
border-radius: 50%; /*圆角*/
background:linear-gradient(black 50%, white 30%);
display: flex; /*弹性盒模型*/
align-items: center;
animation: rotate 5s infinite linear;
}
.left {
width:50px;
height: 50px;
border: 75px solid #000; /*边框:宽度 样式 颜色*/
border-radius: 50%; /*圆角*/
background-color:#fff; /*白色*/
animation: change 1s infinite alternate linear; /*动画: 动画 名称 播多长时间*/
transform-origin: 0 50%;
/*animation: rotate 1s infinite alternate linear;*/
}
.right {
width:50px;
height: 50px;
border: 75px solid #fff; /*边框:宽度 样式 颜色*/
border-radius: 50%; /*圆角*/
background-color:#000; /*白色*/
animation: change 1s infinite alternate linear; /*动画: 动画 名称 播多长时间*/
animation-delay: -1s; /*提前一秒变化*/
transform-origin: 100% 50%;
/*animation: rotate 1s infinite alternate linear;*/
}
/*关键帧:名字 悟空传*/
@keyframes change {
from { /*变小*/
/*变化:大小*/
transform: scale(0.5); /*变成1/2*/
}
to {
transform: scale(1.5);
}
}
@keyframes rotate {
from {
/*变化:角度*/
transform:rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
</head>
<body><!--页面内容存放区-->
<div class="taichi">
<div class="left"></div>
<div class="right"></div>
</div><!--在页面中划分一个区域 class:取名字 有意义的英文-->
</body>
</html>
<html>
<head>
<title>渐变太极图</title>
<meta charset="utf-8"><!--网页用的文字:UTF-8 万国码 -->
<meta name="keywords" content="">
<meta name="description" content="这是一个旋转的太极图,颜色有黑白两色"><!--网页传单:打广告的-->
<style>/*修饰某一区域或元素的宽,高,颜色,位置……*/
. { /*通配符选择器:选中所有元素*/
margin: 0px; /*清除浏览器默认的外边距*/
}
body {
background-color: #ccc;
}
.taichi { /*找到以class命名的叫做taichi的元素*/
/*修饰内容区*/
width: 400px; /*属性名称:属性值*/
height: 400px;
/*background-color:#6600ff;*//*给元素设置一种颜色*/
/*外边距:margin*/
margin: 100px auto 0px auto; /*外边距:上右下左*/
border-radius: 50%; /*圆角*/
background:linear-gradient(black 50%, white 30%);
display: flex; /*弹性盒模型*/
align-items: center;
animation: rotate 5s infinite linear;
}
.left {
width:50px;
height: 50px;
border: 75px solid #000; /*边框:宽度 样式 颜色*/
border-radius: 50%; /*圆角*/
background-color:#fff; /*白色*/
animation: change 1s infinite alternate linear; /*动画: 动画 名称 播多长时间*/
transform-origin: 0 50%;
/*animation: rotate 1s infinite alternate linear;*/
}
.right {
width:50px;
height: 50px;
border: 75px solid #fff; /*边框:宽度 样式 颜色*/
border-radius: 50%; /*圆角*/
background-color:#000; /*白色*/
animation: change 1s infinite alternate linear; /*动画: 动画 名称 播多长时间*/
animation-delay: -1s; /*提前一秒变化*/
transform-origin: 100% 50%;
/*animation: rotate 1s infinite alternate linear;*/
}
/*关键帧:名字 悟空传*/
@keyframes change {
from { /*变小*/
/*变化:大小*/
transform: scale(0.5); /*变成1/2*/
}
to {
transform: scale(1.5);
}
}
@keyframes rotate {
from {
/*变化:角度*/
transform:rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
</head>
<body><!--页面内容存放区-->
<div class="taichi">
<div class="left"></div>
<div class="right"></div>
</div><!--在页面中划分一个区域 class:取名字 有意义的英文-->
</body>
</html>
阅读全文
0 0
- 非原创,使用html5做的旋转的太极图
- 旋转的太极图
- 旋转的太极图
- 自动旋转的太极图
- HTML 5:绘制旋转的太极图
- 用AS3绘图API来画一个旋转的太极图
- openMP的一点使用经验【非原创】
- 非原创的文章
- css3实现旋转太极图
- java原创和非原创的视频
- HTML5实现旋转的太极
- html5的canvas旋转动画
- HTML5 Canvas 旋转的“金字塔”
- HTML5 Canvas 旋转的“金字塔”
- html5制作旋转的div
- HTML5做的2048
- 为你描绘精确的太极图
- 我每天每月每年该做的事(读文章有感,非原创)
- 生成随机数方法总结
- hdu 3439 Sequence 错排公式 + 排列组合+CRT %不是质数
- Android实现数据加载简单动画(二)
- 菜鸟学习微信小程序之文件作用域
- echarts ajax调用数据显示问题 option.data.length<1 报错
- 非原创,使用html5做的旋转的太极图
- 看了一篇讲述Windows程序员前途的文章有感而发转过来
- http状态码详解
- Hibernate 基本概念
- Spring Cloud OAuth2 & Zuul
- Python生成器实现杨辉三角
- 关于发送邮件提醒的错误:java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
- WIN7 + VS2015环境下关于GLEW和GLFW的配置
- MySQL数据导入到infobright中