用CSS3代碼書寫平行四邊形的實現步驟

來源:互聯網
上載者:User
我們知道,如果想要用css3做出旋轉效果,那麼就會使用到CSS3的transform旋轉屬性寫出來,文法是transform:skew。下面做一個旋轉四邊形給大家作為案列研究,感興趣的朋友可以自己動手操作一下。

代碼如下:

<!Doctype html><html><head><meta http-equiv="Content-Type" content="text/html; charset=gbk2312"/><title>用css3旋轉寫平行四邊形</title><style type="text/css">.box{width:1200px;margin:100px auto;}.skew{width:1000px;height:734px;background:#f0eb4f;margin:0 auto;color:#000;font-size:20px;line-height:500px;text-align:center;transform: skew(-15deg);}.skew-main{transform: skew(15deg);}.box02 {width: 0;height: 0;border-top: 100px solid #f44261;border-right: 100px solid transparent;}</style></head><body><div><div><div>用css3旋轉寫平行四邊形</div></div></div></body></html>


相信看了這些案例你已經掌握了方法,更多精彩請關注php中文網其它相關文章!

相關閱讀:

css3中的word-break屬性使用教程

Css3中的變形屬性的相關實現步驟

用css3實現動畫下拉式功能表效果的實現步驟

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.