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 ...
随机推荐
- Spring Boot笔记二:快速创建以及yml文件自动注入
上个笔记写了如何自己去创建Spring boot,以及如何去打jar包,其实,还是有些麻烦的,我们还自己新建了几个文件夹不是. Idea可以让我们快速的去创建Spring boot应用,来看 一.快速 ...
- Oracle 数据库分页查询与排序分页查询
一.分页查询 原始查询语句 SELECT * FROM NASLE_WFSHH 修改为分页查询语句,加上 ROWNUM 列.此处为查询第 1 页,每页 9 条数据 SELECT * FROM ( SE ...
- Mongoose笔记
Mongoose是在node.js异步环境下对mongodb进行便捷操作的对象模型工具 mongoose是针对mongoDB操作的一个对象模型库,封装了mongoDB对文档的.增删改查等方法 使用Ko ...
- JS 比较两个数组是否相等 是否拥有相同元素
Javascript怎么比较两个数组是否相同?JS怎么比较两个数组是否有完全相同的元素?Javascript不能直接用==或者===来判断两个数组是否相等,无论是相等还是全等都不行,以下两行JS代码都 ...
- IIS Express URL Rewrite无效
点击一下项目,再选择属性选项卡(不是右键属性) 如上图,如果托管管道模式是集成的话,改为经典即可.如果在vs2010的 WebDev.WebServer40方式启动 默认就是经典模式
- 2018年度 35 个最好用 Vue 开源库
在本文中,我们将推荐一些非常好用的 Vue 相关的开源项目.无论是开发新手还是经验丰富的老手,我们都喜欢开源软件包.对于开发者来说,如果没有这些开源软件包,很难想象我们的生活会变得多么疲惫不堪,而且靠 ...
- Django之CRM项目Day4-编辑客户 公私户 模糊查询
1.增加客户 2.编辑客户 obj = models.Customer.objects.filter(pk=edit_id).first() form_obj = CustomerForm(insta ...
- Elasticsearch 5.0 —— Head插件部署指南(Head目前支持5.0了!请不要看本篇文章了)
使用ES的基本都会使用过head,但是版本升级到5.0后,head插件就不好使了.下面就看看如何在5.0中启动Head插件吧! Head目前支持5.0了!请不要看本篇文章了 Head目前支持5.0了! ...
- 前端向服务器请求数据并渲染的方式(ajax/jQuery/axios/vue)
原理: jQuery的ajax请求:complete函数一般无论服务器有无数据返回都会显示(成功或者失败都显示数据): return result
- 使用IDEA新建Web工程启动报404的错误
新换了一个项目组被人吐槽配置文件都能写错,所以打算从头开始一步步搭建一个项目,包含ssm基础框架.mongodb工具类.redis工具类.jsf配置.log配置等 今天先来搭建一个web工程.工程搭建 ...