欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          css3中實(shí)現(xiàn)旋轉(zhuǎn)效果的屬性是什么

          css3中實(shí)現(xiàn)旋轉(zhuǎn)效果的屬性是“transform”。transform屬性用于向元素應(yīng)用2D或3D轉(zhuǎn)換,當(dāng)該屬性和rotate()、rotate3d()、rotateX()、rotateY()或rotateZ()函數(shù)一起使用即可實(shí)現(xiàn)旋轉(zhuǎn)。

          css3中實(shí)現(xiàn)旋轉(zhuǎn)效果的屬性是什么

          本教程操作環(huán)境:windows7系統(tǒng)、CSS3&&HTML5版、Dell G3電腦。

          css3中實(shí)現(xiàn)旋轉(zhuǎn)效果的屬性是“transform”。

          transform屬性用于向元素應(yīng)用2D或3D轉(zhuǎn)換,當(dāng)該屬性和以下函數(shù)一起使用即可實(shí)現(xiàn)元素旋轉(zhuǎn):

          • rotate(angle) 定義 2D 旋轉(zhuǎn),在參數(shù)中規(guī)定角度。

          • rotate3d(x,y,z,angle) 定義 3D 旋轉(zhuǎn)。

          • rotateX(angle) 定義沿著 X 軸的 3D 旋轉(zhuǎn)。

          • rotateY(angle) 定義沿著 Y 軸的 3D 旋轉(zhuǎn)。

          • rotateZ(angle) 定義沿著 Z 軸的 3D 旋轉(zhuǎn)。

          示例1:

          <!DOCTYPE html> <html> <head> <meta charset="utf-8">  <style>  div { 	width:200px; 	height:100px; 	background-color:yellow; 	/* Rotate div */ 	transform:rotate(7deg); 	-ms-transform:rotate(7deg); /* IE 9 */ 	-webkit-transform:rotate(7deg); /* Safari and Chrome */ } </style> </head> <body>  <div>Hello</div>  </body> </html>

          css3中實(shí)現(xiàn)旋轉(zhuǎn)效果的屬性是什么

          示例2:

          <!DOCTYPE html> <html> 	<head> 		<meta charset="utf-8"> 		<style> 			*, 			*:after, 			*:before { 				box-sizing: border-box; 			}  			body { 				background: #F5F3F4; 				margin: 0; 				padding: 10px; 				font-family: 'Open Sans', sans-serif; 				text-align: center; 			}  			h1 { 				color: #4c4c4c; 				font-weight: 600; 				border-bottom: 1px solid #ccc; 			}  			h2, 			h4 { 				font-weight: 400; 				color: #4d4d4d; 			}  			.card { 				display: inline-block; 				margin: 10px; 				background: #fff; 				padding: 15px; 				min-width: 200px; 				box-shadow: 0 3px 5px #ddd; 				color: #555; 			}  			.card .box { 				width: 100px; 				height: 100px; 				margin: auto; 				background: #ddd; 				cursor: pointer; 				box-shadow: 0 0 5px #ccc inset; 			}  			.card .box .fill { 				width: 100px; 				height: 100px; 				position: relative; 				background: #03A9F4; 				opacity: .5; 				box-shadow: 0 0 5px #ccc; 				-webkit-transition: 0.3s; 				transition: 0.3s; 			}  			.card p { 				margin: 25px 0 0; 			}  			.rotate:hover .fill { 				-webkit-transform: rotate(45deg); 				transform: rotate(45deg); 			}  			.rotateX:hover .fill { 				-webkit-transform: rotateX(45deg); 				transform: rotateX(45deg); 			}  			.rotateY:hover .fill { 				-webkit-transform: rotateY(45deg); 				transform: rotateY(45deg); 			}  			.rotateZ:hover .fill { 				-webkit-transform: rotate(45deg); 				transform: rotate(45deg); 			}  			.scale:hover .fill { 				-webkit-transform: scale(2, 2); 				transform: scale(2, 2); 			}  			.scaleX:hover .fill { 				-webkit-transform: scaleX(2); 				transform: scaleX(2); 			}  			.scaleY:hover .fill { 				-webkit-transform: scaleY(2); 				transform: scaleY(2); 			} 		</style> 	</head> 	<body> 		<h1>CSS3 元素旋轉(zhuǎn)</h1> 		<!-- Rotate--> 		<div class="card"> 			<div class="box rotate"> 				<div class="fill"></div> 			</div> 			<p>rotate(45deg) </p> 		</div> 		<div class="card"> 			<div class="box rotateX"> 				<div class="fill"></div> 			</div> 			<p>rotateX(45deg)</p> 		</div> 		<div class="card"> 			<div class="box rotateY"> 				<div class="fill"></div> 			</div> 			<p>rotateY(45deg)</p> 		</div> 		<div class="card"> 			<div class="box rotateZ"> 				<div class="fill"></div> 			</div> 			<p>rotateZ(45deg) </p> 		</div> 	</body> </html>

          css3中實(shí)現(xiàn)旋轉(zhuǎn)效果的屬性是什么

          (學(xué)習(xí)視頻分享:css視頻教程)

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號