這篇文章主要介紹了關於css3.0的圖形構成,有著一定的參考價值,現在分享給大家,有需要的朋友可以參考一下
css3.0 的出現給我們帶來了很大的影響,本文主要知識點transform屬性/animate的應用,有興趣的朋友可以參考並學習下實例,希望對你學習圖形構成有所幫助
主要知識點
① transform屬性:
ratate(旋轉度數)
scale(等比例縮放)
skew(x , y);軸和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.0的圖形構成的詳細內容。更多資訊請關注PHP中文網其他相關文章!

两种方法:1、利用display属性,只需给元素添加“display:none;”样式即可。2、利用position和top属性设置元素绝对定位来隐藏元素,只需给元素添加“position:absolute;top:-9999px;”样式。

怎么制作文字轮播与图片轮播?大家第一想到的是不是利用js,其实利用纯CSS也能实现文字轮播与图片轮播,下面来看看实现方法,希望对大家有所帮助!

实现方法:1、使用“:active”选择器选中鼠标点击图片的状态;2、使用transform属性和scale()函数实现图片放大效果,语法“img:active {transform: scale(x轴放大倍数,y轴放大倍数);}”。

自适应布局又称“响应式布局”,是指可以自动识别屏幕宽度、并做出相应调整的网页布局;这样的网页能够兼容多个不同的终端,而不是为每个终端做一个特定的版本。自适应布局是为解决移动端浏览网页而诞生的,能够为使用不同终端的用户提供很好的用户体验。

css3中的动画效果有变形;可以利用“animation:动画属性 @keyframes ..{..{transform:变形属性}}”实现变形动画效果,animation属性用于设置动画样式,transform属性用于设置变形样式。

在css3中,可以利用“animation-timing-function”属性设置动画旋转速度,该属性用于指定动画将如何完成一个周期,设置动画的速度曲线,语法为“元素{animation-timing-function:速度属性值;}”。

css3线性渐变可以实现三角形;只需创建一个45度的线性渐变,设置渐变色为两种固定颜色,一个是三角形的颜色,另一个为透明色即可,语法“linear-gradient(45deg,颜色值,颜色值 50%,透明色 50%,透明色 100%)”。

本篇文章带大家一起深入了解一下CSS3中的新特性::target-text 选择器,聊聊该选择器的作用和使用方法,希望对大家有所帮助!


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。

MinGW - Minimalist GNU for Windows
這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。

Dreamweaver CS6
視覺化網頁開發工具

WebStorm Mac版
好用的JavaScript開發工具