首页
网页制作
网络编程
脚本专栏
数据库
网站运营
网络安全
平面设计
CMS教程
搜索
建站极客
网页制作
CSS
正文
CSS和“★”字符制做的中国国旗实现代码
所属分类:
网页制作
/
CSS
阅读数: 2048
收藏 0
赞 0
分享
在网上看见 某位牛人用CSS做的红旗 就是很牛!
上图先看:
<html> <head> <title>CSS中国国旗</title> <style type="text/css"> .all{ background-color:red; width:960; height=640; } .five{ background-color:red; width:480; height=320; } .big{ position:absolute; background-color:red; margin-top:64px; margin-left:64px; color:yellow; font-size:192px; } .small{ position:absolute; background-color:red; color:yellow; font-size:64px; } .s1{ margin-top:32px; margin-left:288px; filter:progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',M11=0.6565,M12=0.7543,M21=-0.7543,M22=0.6565); } .s2{ margin-top:96px; margin-left:352px; filter:progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',M11=0.8978,M12=0.4404,M21=-0.4404,M22=0.8978); } .s3{ margin-top:192px; margin-left:352px; filter:progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',M11=0.9994,M12=0.0359,M21=-0.0359,M22=0.9994); } .s4{ margin-top:256px; margin-left:288px; filter:progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',M11=0.9357,M12=-0.3528,M21=0.3528,M22=0.9357); } </style> </head> <body> <div class="all"> <div class="five"> <div class="big">★</div> <div class="small s1">★</div> <div class="small s2">★</div> <div class="small s3">★</div> <div class="small s4">★</div> </div> </div> </body> </html> 第2种代码,全部镶嵌在“<body>..</body>”网页标签里: <div style="background-color:red;width:960;height=640;"> <div style="background-color:red;width:480;height=320;"> <div style="z-index:2;position:absolute;background-color:red;margin-top:64px;margin-left:64px;color:yellow;font-size:192px;">★</div> <div style="z-index:2;position:absolute;background-color:red;margin-top:32px;margin-left:288px;color:yellow;font-size:64px;filter:progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',M11=0.6565,M12=0.7543,M21=-0.7543,M22=0.6565);">★</div> <div style="z-index:2;position:absolute;background-color:red;margin-top:96px;margin-left:352px;color:yellow;font-size:64px;filter:progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',M11=0.8978,M12=0.4404,M21=-0.4404,M22=0.8978);">★</div> <div style="z-index:2;position:absolute;background-color:red;margin-top:192px;margin-left:352px;color:yellow;font-size:64px;filter:progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',M11=0.9994,M12=0.0359,M21=-0.0359,M22=0.9994);">★</div> <div style="z-index:2;position:absolute;background-color:red;margin-top:256px;margin-left:288px;color:yellow;font-size:64px;filter:progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',M11=0.9357,M12=-0.3528,M21=0.3528,M22=0.9357);">★</div> </div> </div>
提示:您可以先修改部分代码再运行
更多精彩内容
其他人还在看
CSS3实现背景透明文字不透明的示例代码
这篇文章主要介绍了CSS3实现背景透明文字不透明的示例代码的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
评论 0
收藏 0
赞 0
分享
浅谈CSS中的尺寸单位
这篇文章主要介绍了浅谈CSS中的尺寸单位的相关资料,浏览器的兼容性越来越好,移动端基本是清一色的webkit,经常会用到css的不同尺寸/长度单位,这里做个整理。感兴趣的小伙伴们可以参考一下
评论 0
收藏 0
赞 0
分享
CSS中有些属性的前面会加上“*”或“_”所代表的意思
这篇文章主要介绍了CSS中有些属性的前面会加上“*”或“_”所代表的意思,需要的朋友可以参考下
评论 0
收藏 0
赞 0
分享
CSS 设置滚动条样式的实例代码
这篇文章主要介绍了CSS 设置滚动条样式的实例代码,非常不错,具有一定的参考借鉴价值,需要的朋友参考下吧
评论 0
收藏 0
赞 0
分享
纯CSS制作各种各样的网页图标(三角形、暂停按钮、下载箭头、加号等)
这篇文章主要介绍了纯CSS制作各种各样的网页图标(三角形、暂停按钮、下载箭头、加号等)的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
评论 0
收藏 0
赞 0
分享
纯css实现多级折叠菜单折叠树效果
这篇文章主要介绍了纯css实现多级折叠菜单折叠树效果,运用checkbox的checked值来判断下级栏目是否展开,通过css3选择器提供的checked伪类来实现此效果,感兴趣的朋友参考下吧
评论 0
收藏 0
赞 0
分享
CSS Grid 网格布局全解析
这篇文章主要介绍了CSS Grid 网格布局全解析的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
评论 0
收藏 0
赞 0
分享
css flex 弹性布局详解
这篇文章主要介绍了css flex 弹性布局详解的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
评论 0
收藏 0
赞 0
分享
CSS3 二级导航菜单的制作的示例
这篇文章主要介绍了CSS3 二级导航的制作的示例的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
评论 0
收藏 0
赞 0
分享
使用css禁用input、checkbox、select等html控件实现disable效果
这篇文章主要介绍了使用css禁用input、checkbox、select等html控件实现disable效果,需要的朋友可以参考下
评论 0
收藏 0
赞 0
分享
查看更多
网络赚钱
更多
即使现在停产 微商面膜至少需需5年才能卖完
站长故事实战:淘宝买关键词排名SEO服务攻略介绍
企业网站通过流量变现有哪些关键的环节需要注意?
在校大学生利用网络可以做什么?在校大学生利用网络赚钱方式介绍
手机赚钱软件哪个比较好 手机赚钱软件排行榜及使用方法 手机赚钱最快的软件汇总
网站赚钱这么难吗 你学会了多少?
站长故事
更多
奇幻咔咔3D小熊孟得明 揭秘瞬间火爆网络的背后故事
揭晓互联网三大巨头(百度,腾讯,阿里巴巴)和草根站长的往来
我做私服网站的一些事情
站长从菜鸟到资深必经过程
做好网站维护 持续吸引用户浏览
草根站长告诉你通过互联网赚钱到底难不难(真实经历)