700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > Css3旋转 位移 缩放 倾斜动画

Css3旋转 位移 缩放 倾斜动画

时间:2020-02-12 08:34:21

相关推荐

Css3旋转 位移 缩放 倾斜动画

rotate:旋转

skew:倾斜

sacle:缩放

translate:位移

<!DOCTYPE html><html><head><meta charset="utf-8"><title></title><style type="text/css">*{margin: 0;padding: 0;}section{width: 600px;height: 300px;background: pink;margin: 100px auto;}div{width: 100px;height: 30px;background: blue;/* 第一个左右,第二个上下 */transform: translate(200px,0);transition: 1s;}section:hover div{/* transform: translate(400px,200px); */transform: translateY(400px);/* transform: translateX(200px); */}</style></head><body><section><div></div></section></body></html>

<!DOCTYPE html><html><head><meta charset="utf-8"><title></title><style type="text/css">*{margin: 0;padding: 0;}section{width: 300px;height: 300px;border: 5px solid red;margin: 100px auto;overflow: hidden;}section img{width: 100%;height: 100%;transition: 1s;}section:hover img{transform: scale(0.8);}</style></head><body><section><img src="img/2.jpg" ></section></body></html>

<!DOCTYPE html><html><head><meta charset="utf-8"><title></title><style type="text/css">*{margin: 0;padding: 0;}section{width: 600px;height: 300px;background: pink;margin: 100px auto;}div{width: 100px;height: 30px;background: blue;transition: 1s;}section:hover div{transform: rotate(60deg);}</style></head><body><section><div></div></section></body></html>

<!DOCTYPE html><html><head><meta charset="utf-8"><title></title><style type="text/css">*{margin: 0;padding: 0;}section{width: 600px;height: 300px;background: pink;margin: 100px auto;}div{width: 100px;height: 30px;background: blue;transition: 1s;}section:hover div{transform: skew(30deg);}</style></head><body><section><div></div></section></body></html>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。