css3新属性运用
1、css3新单位vh、vw,这个单位是相对显示窗口的宽度或高度
vh
等于viewport高度的1/100
.例如,如果浏览器的高是900px
,1vh
求得的值为9px
。同理,如果显示窗口宽度为750px
,1vw
求得的值为7.5px
。
2、动画效果(圈圈从小到大放大)
===》
===》》》
<style>
.star {
position: absolute;
width: 80px;
height: 80px;
}
.point {
position: absolute;
left: ;
top: ;
bottom: ;
right: ;
margin: auto;
width: 10px;
height: 10px;
background: transparent;
background-clip: padding-box;
border-radius: %;
-webkit-border-radius: %;
-moz-border-radius: %;
border-radius: %;
}
.star .point-dot {
z-index: ;
background-color: #74E0F1;
border: 1px solid #74E0F1;
}
.pa- {
width: %;
height: %;
}
.star .pa-:after {
position: absolute;
content: '';
display: block;
left: ;
bottom: ;
top: ;
right: ;
margin: auto;
border-radius: %;
-webkit-border-radius: %;
-moz-border-radius: %;
border-radius: %;
opacity: ;
border: 2px solid #74E0F1;
-webkit-animation: ripple 3s linear 0ms infinite;
-moz-animation: ripple 3s linear 0ms infinite;
-o-animation: ripple 3s linear 0ms infinite;
animation: ripple 3s linear 0ms infinite;
}
.star .pa-:after {
position: absolute;
content: '';
display: block;
left: ;
bottom: ;
top: ;
right: ;
margin: auto;
border-radius: %;
-webkit-border-radius: %;
-moz-border-radius: %;
border-radius: %;
opacity: ;
border: 2px solid #74E0F1;
-webkit-animation: ripple 3s linear .5s infinite;
-moz-animation: ripple 3s linear .5s infinite;
-o-animation: ripple 3s linear .5s infinite;
animation: ripple 3s linear .5s infinite;
}
@keyframes ripple {
% {transform: scale();opacity:;}
% {transform: scale(0.7);opacity:;}
% {transform: scale();opacity:;}
}}
}
</style>
</head>
<body> <span class="star">
<i class="point point-dot"></i>
<i class="pa-10 point"></i>
<i class="pa-20 point"></i>
</span> </body>
3.常见的PC鼠标滑过,出现呢下滑线,移开消失
<li><a>首页</a></li>
a:after {
transition: 0.3s all;
content: '';
display: block;
position: relative;
width: 0;
height: 3px;
background: #fff;
}
a:hover a:after {
background: #4d72e2;
}
====》》
===》》
元素初始加载的时候,动画开始执行变动
/* 动画移动效果 */
.run .moveToTop {
-webkit-animation: moveToTop .5s;
-moz-animation: moveToTop .5s;
-o-animation: moveToTop .5s;
animation: moveToTop .5s;
}
.run .moveToBottom {
-webkit-animation: moveToBottom .5s;
-moz-animation: moveToBottom .5s;
-o-animation: moveToBottom .5s;
animation: moveToBottom .5s;
}
.run .moveToLeft {
-webkit-animation: moveToLeft .5s;
-moz-animation: moveToLeft .5s;
-o-animation: moveToLeft .5s;
animation: moveToLeft .5s;
}
.run .moveToRight {
-webkit-animation: moveToRight .5s;
-moz-animation: moveToRight .5s;
-o-animation: moveToRight .5s;
animation: moveToRight .5s;
}
@keyframes moveToLeft {
% {transform: translateX(50px) translateZ(-50px)}
% {transform: translateX(0px) translateZ(0px)}
}
@keyframes moveToRight {
% {transform: translateX(-50px) translateZ(-50px)}
% {transform: translateX(0px) translateZ(0px)}
}
@keyframes moveToTop {
% {transform: translateY(50px) translateZ(-50px)}
% {transform: translateY(0px) translateZ(0px)}
}
@keyframes moveToBottom {
% {transform: translateY(-50px) translateZ(-50px)}
% {transform: translateY(0px) translateZ(0px)}
}
css3新属性运用的更多相关文章
- 基于css3新属性transform及原生js实现鼠标拖动3d立方体旋转
基于css3新属性transform,实现3d立方体的旋转 通过原生JS,点击事件,鼠标按下.鼠标抬起和鼠标移动事件,实现3d立方体的拖动旋转,并将旋转角度实时的反应至界面上显示 实现原理:通过获取鼠 ...
- 两点补充——CSS3新属性以及弹性布局
CSS3 新属性 一.[ CSS3新增属性前缀 ] 1.-webkit-:chrome/safari 2.-moz-:火狐 3.-mo-:IE 4.-o-: Opera 欧朋 二 .[CSS 长度单位 ...
- css3新属性position: sticky 一分钟实现 导航栏悬停功能
css3新属性position: sticky 一分钟实现 导航栏悬停功能 前言 正文 前言 想必很多前端小伙伴经常会在开发中遇到这样一个需求,就是在下划时,导航栏悬停在屏幕最上方,例如咱们的csdn ...
- 使用css3新属性clip-path制作小图标
一般一个网页上面,或多或少都会用到一些小图标,展示这些小图标的方法有很多种.最简单的做法就是将UI图上面的每个小图标都保存为图片,一个小图标就一张图片.但这也是比较笨的方法,因为浏览器同一时间最多加载 ...
- css3新属性@ text-shadow
text-shodow是css3的新属性,可以利用这个属性使字体更有立体感,还可以创造有趣的效果. 1.语法形式:text-shadow : x-offset(x轴偏移量) y-offset(y轴偏移 ...
- css3新属性的总结
今天继续总结css3的一些css3新样式,先列一个简单的提纲,重要的还是圆角.阴影.渐变.文字缩略,最最重要的是过度transition,变换transform和animation圆角阴影渐变 圆形渐 ...
- CSS3新属性注释及实例
这里把CSS3的新属性单独拿出来讲解一下: border-radius 属性用于创建圆角 div { border:2px solid; border-radius:25px; -moz-border ...
- css3新属性的学习使用
display 可选值:none隐藏元素: block显示为块级元素: inline显示为行级元素 inlineblock显示为内联块级元素,本身将是一个行级元素,但是拥有 块级元素的所有属性,比如宽 ...
- css3新属性
CSS calc()函数来制作响应式网格: calc是英文单词calculate(计算)的缩写,是css3的一个新增的功能,你可以使用calc()给元素的border.margin.pading.fo ...
随机推荐
- 运维监控-基于yum的方式部署Zabbix Server 4.0 版本
运维监控-基于yum的方式部署Zabbix Server 4.0 版本 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.如何选择zabbix版本 1>.打开zabbix官方 ...
- python 面向对象(二)成员
##################################总结########################### 类的成员: 变量: 实例变量 对象.属性=xxx 类变量 ...
- layui打印html页面转成pdf
<!DOCTYPE html><html lang="zh"><head> <meta charset="UTF-8&q ...
- 062、如何使用flannel host-gw backend(2019-04-02 周二)
参考https://www.cnblogs.com/CloudMan6/p/7457653.html flannel 支持多种backend,前面学习的是 vxlan backend ,host- ...
- [Android] Android Studio 使用config.gradle统一管理项目的依赖库
gradle支持自定义config.gradle,在GoogleSamples中提到我们必须使用关键字ext(对应ExtraPropertitesExtension的实例)来定义动态属性 如何实现: ...
- yum方式安装mysql
安装步骤 1. 安装yum仓库 到https://dev.mysql.com/downloads/repo/yum/ 下载对应操作系统版本的yum仓库,然后进行安装:sudo rpm -Uvh pla ...
- 【转载】C#:使用双缓冲让界面绘制图形时避免闪烁
https://blog.csdn.net/fujie724/article/details/5767064#
- setDefaultKeyMode设置Activity的五种按键模式
setDefaultKeyMode (int mode) 用来设置一个Activity的默认的按键模式, mode一共有五种 DEFAULT_KEYS_DISABLE DEFAULT_KEYS_DIA ...
- ****** 二 ******、软设笔记【数据结构】-KMP算法、树、二叉树
五.KMP算法: *KMP算法是一种改进的字符串匹配算法. *KMP算法的关键是利用匹配失败后的信息,尽量减少模式串与主串的匹配次数以达到快速匹配的目的.具体实现就是实现一个next()函 ...
- 传入mybatis的xml为Long型时报There is no getter for property named 'VARCHAR' in
修改前 <insert id="insert" parameterType="com.taotao.pojo.TbContent" > i ...