搜索
首页web前端css教程css3.0的图形构成

css3.0的图形构成

Jun 28, 2018 pm 02:45 PM
css3

这篇文章主要介绍了关于css3.0的图形构成,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下

css3.0 的出现给我们带来了很大的影响,本文主要知识点 transform属性/animate的应用,感兴趣的朋友可以参考并学习下实例,希望对你学习图形构成有所帮助

主要知识点
① transform属性:
    ratate(旋转度数)
    scale(等比例缩放)
    skew(x , y);让元素倾斜显示,包含两个参数值,分别表示X轴和Y轴倾斜的角度,如果第二个参数为空,则默认为0,参数为负表示向相反方向倾斜。
②animate 适用于鼠标经过产生宽度,高度,left,top等等 示例 transition:1s ease all;所有事件产生动画! 

p { 
-webkit-animation-name: pulse; 
-webkit-animation-duration: 2s; 
-webkit-animation-iteration-count: infinite; 
-webkit-animation-timing-function: ease-in-out; 
-webkit-animation-direction: alternate; 
}@-webkit-keyframes pulse { 
from { 
opacity: 0.0; 
font-size: 100%; 
} 
to { 
opacity: 1.0; 
font-size: 200%; 
} 
}style 
*{ margin: 0; padding: 0;} 
body { 
overflow: hidden; 
} 
#clouds{ 
background:-webkit-linear-gradient(top,#c9dbe9 0%,#fff 100%);/*等价于background:-webkit-gradient(linear,left top,left bottom,from(c9dbe9),to(#fff))*/ 
background:-moz-linear-gradient(top,#c9dbe9 0%,#fff 100%); 
background:-o-linear-gradient(top,#c9dbe9 0%,#fff 100%); 
padding:100px 0px; 
} 
.cloud{ 
width:200px; 
height:60px; 
background:#FFF; 
border-radius:200px; 
-webkit-border-radius:200px; 
-moz-border-radius:200px; 
-o-border-radius:200px; 
position:relative;} 
.cloud:after,.cloud:before{ 
content:''; 
position:absolute; 
background:#FFF; 
width:100px; 
height:80px; 
top:-15px; 
left:10px; 
border-radius:100px; 
-webkit-border-radius:100px; 
-moz-border-radius:100px; 
-o-border-radius:100px;} 
.cloud:after{ 
width:120px; 
height:120px; 
top:-55px; 
left:auto; 
right:15px;} 
.x1{ 
-webkit-animation:moveclouds 25s linear infinite; 
-moz-animation:moveclouds 25s linear infinite; 
-o-animation:moveclouds 25s linear infinite;} 
.x2{ 
left:200px; 
transform:scale(0.6); 
-webkit-transform:scale(0.6); 
-moz-transform:scale(0.6); 
-o-transform:scale(0.6); 
opacity:0.6; 
animation:moveclouds 25s linear infinite; 
-webkit-animation:moveclouds 25s linear infinite; 
-moz-animation:moveclouds 25s linear infinite; 
-o-animation:moveclouds 25s linear infinite;} 
.x3{ 
top:-200px; 
left:-250px; 
transform:scale(0.6); 
-webkit-transform:scale(0.6); 
-moz-transform:scale(0.6); 
-o-transform:scale(0.6); 
opacity:0.6; 
animation:moveclouds 25s linear infinite; 
-webkit-animation:moveclouds 25s linear infinite; 
-moz-animation:moveclouds 25s linear infinite; 
-o-animation:moveclouds 25s linear infinite;} 
.x4{ 
top:200px; 
left:470px; 
transform:scale(0.6); 
-webkit-transform:scale(0.6); 
-moz-transform:scale(0.6); 
-o-transform:scale(0.6); 
opacity:0.6; 
animation:moveclouds 25s linear infinite; 
-webkit-animation:moveclouds 25s linear infinite; 
-moz-animation:moveclouds 25s linear infinite; 
-o-animation:moveclouds 25s linear infinite;} 
.x5{ 
left:470px; 
top:-250px; 
transform:scale(0.8); 
-webkit-transform:scale(0.8); 
-moz-transform:scale(0.8); 
-o-transform:scale(0.8); 
opacity:0.8; 
animation:moveclouds 25s linear infinite; 
-webkit-animation:moveclouds 18s linear infinite; 
-moz-animation:moveclouds 18s linear infinite; 
-o-animation:moveclouds 18s linear infinite;} 
@-webkit-keyframes moveclouds{ 
0%{margin-left:1000px;} 
100%{margin-left:-1000px;} 
} 
@-moz-keyframes moveclouds{ 
0%{margin-left:1000px;} 
100%{margin-left:-1000px;} 
}
@-o-keyframes moveclouds{ 
0%{margin-left:1000px;} 
100%{margin-left:-1000px;} 
} 
html 
<p id="clouds"> 
  <p class="cloud x1"></p> 
  <p class="cloud x2"></p> 
  <p class="cloud x3"></p> 
  <p class="cloud x4"></p> 
  <p class="cloud x5"></p> 
</p>

以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!

相关推荐:

CSS3中Transition动画属性的用法介绍

CSS实现网页背景渐变的四种代码设置

以上是css3.0的图形构成的详细内容。更多信息请关注PHP中文网其他相关文章!

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
Flexbox vs Grid:我应该学习两者吗?Flexbox vs Grid:我应该学习两者吗?May 10, 2025 am 12:01 AM

是的,youshouldlearnbothflexboxandgrid.1)flexboxisidealforone-demensional,flexiblelayoutslikenavigationmenus.2)gridexcelstcelsintwo-dimensional,confffferDesignssignssuchasmagagazineLayouts.3)blosebothenHancesSunHanceSlineHancesLayOutflexibilitibilitibilitibilitibilityAnderibilitibilityAndresponScormentilial anderingStruction

轨道力学(或我如何优化CSS KeyFrames动画)轨道力学(或我如何优化CSS KeyFrames动画)May 09, 2025 am 09:57 AM

重构自己的代码看起来是什么样的?约翰·瑞亚(John Rhea)挑选了他写的一个旧的CSS动画,并介绍了优化它的思维过程。

CSS动画:很难创建它们吗?CSS动画:很难创建它们吗?May 09, 2025 am 12:03 AM

CSSanimationsarenotinherentlyhardbutrequirepracticeandunderstandingofCSSpropertiesandtimingfunctions.1)Startwithsimpleanimationslikescalingabuttononhoverusingkeyframes.2)Useeasingfunctionslikecubic-bezierfornaturaleffects,suchasabounceanimation.3)For

@KeyFrames CSS:最常用的技巧@KeyFrames CSS:最常用的技巧May 08, 2025 am 12:13 AM

@keyframesispopularduetoitsversatoryand and powerincreatingsmoothcssanimations.keytricksinclude:1)definingsmoothtransitionsbetnestates,2)使用AnimatingmatematingmultationmatingMultationPropertiessimultane,3)使用使用4)使用BombingeNtibalibility,4)使用BombingingWithjavofofofofofoffo

CSS计数器:自动编号的综合指南CSS计数器:自动编号的综合指南May 07, 2025 pm 03:45 PM

CSSCOUNTERSAREDOMANAGEAUTOMANAMBERINGINWEBDESIGNS.1)他们可以使用forterablesofcontents,ListItems,and customnumbering.2)AdvancedsincludenestednumberingSystems.3)挑战挑战InclassINCludeBrowsEccerCerceribaliblesibility andperformiballibility andperformissises.4)创造性

使用卷轴驱动动画的现代滚动阴影使用卷轴驱动动画的现代滚动阴影May 07, 2025 am 10:34 AM

使用滚动阴影,尤其是对于移动设备,是克里斯以前涵盖的一个微妙的UX。杰夫(Geoff)涵盖了一种使用动画限制属性的新方法。这是另一种方式。

重新访问图像图重新访问图像图May 07, 2025 am 09:40 AM

让我们快速进修。图像地图一直返回到HTML 3.2,首先是服务器端地图,然后使用映射和区域元素通过图像上的单击区域定义了可单击区域。

DEV状态:每个开发人员的调查DEV状态:每个开发人员的调查May 07, 2025 am 09:30 AM

开发委员会调查现已开始参与,并且与以前的调查不同,它涵盖了除法:职业,工作场所,以及健康,爱好等。 

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

将Eclipse与SAP NetWeaver应用服务器集成。

记事本++7.3.1

记事本++7.3.1

好用且免费的代码编辑器

EditPlus 中文破解版

EditPlus 中文破解版

体积小,语法高亮,不支持代码提示功能

MinGW - 适用于 Windows 的极简 GNU

MinGW - 适用于 Windows 的极简 GNU

这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

功能强大的PHP集成开发环境