CSS 魔法系列:纯 CSS 绘制各种图形《系列五》
我们的网页因为 CSS 而呈现千变万化的风格。这一看似简单的样式语言在使用中非常灵活,只要你发挥创意就能实现很多比人想象不到的效果。特别是随着 CSS3 的广泛使用,更多新奇的 CSS 作品涌现出来。《CSS 魔法系列》继续给大家带来 CSS 在图形绘制中的创新使用。
您可能感兴趣的相关文章
Egg
1 2 3 4 5 6 7 8 | #egg { display : block ; width : 126px ; height : 180px ; background-color : red ; -webkit-border-radius: 63px 63px 63px 63px / 108px 108px 72px 72px ; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40% ; } |
Pac-Man
1 2 3 4 5 6 7 8 9 10 11 12 | #pacman { width : 0px ; height : 0px ; border-right : 60px solid transparent ; border-top : 60px solid red ; border-left : 60px solid red ; border-bottom : 60px solid red ; border-top-left-radius: 60px ; border-top-right-radius: 60px ; border-bottom-left-radius: 60px ; border-bottom-right-radius: 60px ; } |
Talk Bubble
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #talkbubble { width : 120px ; height : 80px ; background : red ; position : relative ; -moz-border-radius: 10px ; -webkit-border-radius: 10px ; border-radius: 10px ; } #talkbubble:before { content : "" ; position : absolute ; right : 100% ; top : 26px ; width : 0 ; height : 0 ; border-top : 13px solid transparent ; border-right : 26px solid red ; border-bottom : 13px solid transparent ; } |
12 Point Burst
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #burst -12 { background : red ; width : 80px ; height : 80px ; position : relative ; text-align : center ; } #burst -12: before, #burst -12: after { content : "" ; position : absolute ; top : 0 ; left : 0 ; height : 80px ; width : 80px ; background : red ; } #burst -12: before { -webkit-transform: rotate( 30 deg); -moz-transform: rotate( 30 deg); -ms-transform: rotate( 30 deg); -o-transform: rotate( 30 deg); } #burst -12: after { -webkit-transform: rotate( 60 deg); -moz-transform: rotate( 60 deg); -ms-transform: rotate( 60 deg); -o-transform: rotate( 60 deg); } |
8 Point Burst
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #burst -8 { background : red ; width : 80px ; height : 80px ; position : relative ; text-align : center ; -webkit-transform: rotate( 20 deg); -moz-transform: rotate( 20 deg); -ms-transform: rotate( 20 deg); -o-transform: rotate( 20 eg); } #burst -8: before { content : "" ; position : absolute ; top : 0 ; left : 0 ; height : 80px ; width : 80px ; background : red ; -webkit-transform: rotate( 135 deg); -moz-transform: rotate( 135 deg); -ms-transform: rotate( 135 deg); -o-transform: rotate( 135 deg); } |
您可能感兴趣的相关文章
作者:山边小溪
主站:yyyweb.com 记住啦:)
欢迎任何形式的转载,但请务必注明出处。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
2012-11-29 经典网页设计:20例简洁精美的着陆页面设计
2012-11-29 设计师必备的25套漂亮的网站 LOGO 设计模板
2012-11-29 最好的免费软件推荐给 Web 设计人员和开发人员
2011-11-29 20个优秀的移动(iPhone)网站设计案例
2011-11-29 精选30个富有想象力的网站设计作品