日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 前端技术 > CSS >内容正文

CSS

html中下边框过渡效果,CSS3 参与背景过度的属性有哪些(transition-property语法规则及多组过渡效果实例)...

發(fā)布時(shí)間:2024/9/27 CSS 67 豆豆
生活随笔 收集整理的這篇文章主要介紹了 html中下边框过渡效果,CSS3 参与背景过度的属性有哪些(transition-property语法规则及多组过渡效果实例)... 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

CSS3 新增了背景或元素運(yùn)動(dòng)過度效果屬性 transition,其中有一個(gè)取值為過渡實(shí)體 transition-property,也就是設(shè)置什么參與過渡,有多個(gè)實(shí)體可供選擇,如常用背景顏色(background-color)、背景圖象(background-image)、字體顏色(color)等。

為便于選擇不同的屬性作為過渡實(shí)體,以下將在文章最后列出所有可以參與過渡的屬性。下面先看 transition-property 的語法規(guī)則,再看在網(wǎng)頁設(shè)計(jì)中具體使用實(shí)例。

一、transition-property語法規(guī)則

transition-property:[, * ]

= none | all |

二、語法說明

1、transition-property 可以設(shè)置多組值,默認(rèn)值為 all

A、 表示第一組參與過渡的屬性,不能省略;

B、[]中的 表示第二組參與過渡的屬性,可以省略;

C、* 表示第三組、第四組、……第n組參與過渡的屬性,可以省略;

2、 取值分別如下:

A、none:表示不設(shè)置參與過渡的屬性;

B、all:表示所有可以參與過渡的css屬性,具體見文章后面;

C、:指定參與過渡的css屬性 ;

三、transition-property 多組過渡效果實(shí)例

html代碼:

  • 過度屬性為:背景顏色transition-property:background-color;
  • 過度屬性為:邊框顏色和寬度transition-property:border-color,border-width;
  • 過度屬性為:字體顏色transition-property:color;
  • 過度屬性為:字體大小transition-property:font-size;
  • 過度屬性為:陰影transition-property:text-shadow;

CSS代碼:

.transition-property{overflow:hidden;margin:0px;padding:0px;list-style:none;}

.transition-property li{width:300px;height:60px;margin-bottom:10px;padding:6px;border:1px solid #ab9595;background-color:#e3e2e0;}

.transition-property li.bgcolor{transition-property:background-color;transition-duration:.5s;transition-timing-function:ease;}

.transition-property li.bdcolor{transition-property:border-color,border-width;transition-duration:.5s;transition-timing-function:ease-in;}

.transition-property li.color{transition-property:color;transition-duration:.6s;transition-timing-function:ease-in-out;}

.transition-property li.fontsize{transition-property:font-size;transition-duration:.5s;transition-timing-function:ease-in;}

.transition-property li.textshadow{transition-property:text-shadow;transition-duration:.6s;transition-timing-function:ease-in-out;}

.transition-property li:nth-child(1):hover{background-color:#ff0030;}

.transition-property li:nth-child(2):hover{border-color:#0042ff; border-width:medium;}

.transition-property li:nth-child(3):hover{color:#b21a06;}

.transition-property li:nth-child(4):hover{font-size:18px;}

.transition-property li:nth-child(5):hover{box-shadow:2px 2px 3px 3px rgba(200, 199, 199, .6);}

效果圖:

過度屬性為:背景顏色

transition-property:background-color;

過度屬性為:邊框顏色和寬度

transition-property:border-color,border-width;

過度屬性為:字體顏色

transition-property:color;

過度屬性為:字體大小

transition-property:font-size;

過度屬性為:陰影

transition-property:text-shadow;

可選為過渡的屬性:

屬性名稱類型

transformall

background-colorcolor

background-imageonly gradients

background-positionpercentage, length

border-bottom-colorcolor

border-bottom-widthlength

border-colorcolor

border-left-colorcolor

border-left-widthlength

border-right-colorcolor

border-right-widthlength

border-spacinglength

border-top-colorcolor

border-top-widthlength

border-widthlength

bottomlength, percentage

colorcolor

croprectangle

font-sizelength, percentage

font-weightnumber

grid-*various

heightlength, percentage

leftlength, percentage

letter-spacinglength

line-heightnumber, length, percentage

margin-bottomlength

margin-leftlength

margin-rightlength

margin-toplength

max-heightlength, percentage

max-widthlength, percentage

min-heightlength, percentage

min-widthlength, percentage

opacitynumber

outline-colorcolor

outline-offsetinteger

outline-widthlength

padding-bottomlength

padding-leftlength

padding-rightlength

padding-toplength

rightlength, percentage

text-indentlength, percentage

text-shadowshadow

toplength, percentage

vertical-alignkeywords, length, percentage

visibilityvisibility

widthlength, percentage

word-spacinglength, percentage

z-indexinteger

zoomnumber

總結(jié)

以上是生活随笔為你收集整理的html中下边框过渡效果,CSS3 参与背景过度的属性有哪些(transition-property语法规则及多组过渡效果实例)...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。