u1jodi1q 发表于 2024-6-29 15:57:41

代码变油画,前端小姐姐只用HTML+CSS就能做到,让美术设计亦惊叹丨GitHub热榜

<span style="color: black;">晓查 郭一璞 发自 凹非寺</span><span style="color: black;">量子位 <span style="color: black;">报告</span> | 公众号 QbitAI</span><span style="color: black;">HTML不是编程语言,但这并不妨碍精通它的大佬玩出<span style="color: black;">花招</span>来。</span><span style="color: black;">普通的前端,用HTML+CSS制作网页,元素简单,<span style="color: black;">工具</span>丰富。</span><strong style="color: blue;"><span style="color: black;">大佬级前端,用HTML+CSS绘画,全程<span style="color: black;">不消</span>PS、AI这种图形化的<span style="color: black;">照片</span>编辑器,单纯敲一行行代码纯手工绘制。</span></strong><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">把代码转换之后,就变<span style="color: black;">成为了</span>鲜嫩的<span style="color: black;">果蔬</span>:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;"><span style="color: black;">或</span>画出洛可可风格的古典女性肖像:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">还有弗拉芒巴洛克肖像风格的<span style="color: black;">名人</span>画像,充满了中世纪的禁欲感:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">现代的<span style="color: black;">亦</span>有,<span style="color: black;">例如</span>这位在粉色灯光下的着礼服的妹子:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">以及充满着50年代气息的复古风<span style="color: black;">名人</span>海报:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">曲线、光影、渐变,<span style="color: black;">每一个</span>元素都相当<span style="color: black;">繁杂</span>。</span><span style="color: black;"><span style="color: black;">况且</span>,创作过程中<span style="color: black;">不消</span>SVG,只用Atom文本编辑器和Chrome<span style="color: black;">研发</span>者<span style="color: black;">工具</span>。</span><span style="color: black;"><span style="color: black;">亦</span><span style="color: black;">便是</span>说,画面上的每一条曲线和渐变,每一处高光和<span style="color: black;">暗影</span>,每一根头发和睫毛,每一片蕾丝和褶皱,都是一行行代码从头敲出来的!</span><span style="color: black;">如此精细程度和创造力,让学美术的网友感叹“学画画不如写代码”,让学计算机的<span style="color: black;">朋友</span>觉得“别人写的这么艺术,<span style="color: black;">必定</span>是我的教科书打开方式不对”。</span><span style="color: black;">真·交叉学科大佬。</span><span style="color: black;">这个项目<span style="color: black;">亦</span>一度登上了GitHub Trending排行榜第二名:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">并且Issues里都是<span style="color: black;">许多</span>用户的膜拜:厉害!崇拜!太棒了!</p>
    </span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">它们的作者,是前端大神Diana Smith小姐姐,她<span style="color: black;">日前</span>是<span style="color: black;">公司</span>及软件<span style="color: black;">研发</span>商Atlassian的一名资深Web<span style="color: black;">研发</span>。</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;">
    <h2 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">绘制过程</span></h2><span style="color: black;">Diana在专门讨论CSS的网站CSS-Tricks写下了<span style="color: black;">仔细</span>的教程。</span><span style="color: black;">画出<span style="color: black;">这般</span>一个图形分成几步?</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;"><span style="color: black;">倘若</span><span style="color: black;">不消</span>CSS,<span style="color: black;">通常</span>都是直接嵌入这个特殊的图形。</span><span style="color: black;"><span style="color: black;">倘若</span>用CSS,<span style="color: black;">那样</span>就从黑色矩形<span style="color: black;">起始</span>,<span style="color: black;">而后</span>在两侧加上上两个</span><span style="color: black;">与白色背景颜色匹配的边框半径元素。</span><span style="color: black;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></span><span style="color: black;">先画出一个黑色矩形,<span style="color: black;">而后</span>两边用圆弧遮挡。有了<span style="color: black;">基本</span>形状后,下一步<span style="color: black;">便是</span>给它添上渐变的背景。<span style="color: black;">然则</span><span style="color: black;">倘若</span>用矩形方式填充,得到的效果<span style="color: black;">便是</span><span style="color: black;">这般</span>的:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">Diana的办法是:在<span style="color: black;">保存</span>矩形的<span style="color: black;">同期</span>,加上两个弯曲的Div,把凹进去的部分<span style="color: black;">亦</span>填充上。</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">最后完整的代码是<span style="color: black;">这般</span>的:</span><span style="color: black;">div</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">{</p>&nbsp;&nbsp;<span style="color: black;">width</span>:&nbsp;<span style="color: black;">500px</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>&nbsp;&nbsp;<span style="color: black;">height</span>:&nbsp;<span style="color: black;">350px</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>&nbsp;&nbsp;<span style="color: black;">bac<span style="color: black;">公斤</span>round</span>:&nbsp;<span style="color: black;">#000</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>&nbsp;&nbsp;<span style="color: black;">position</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">:&nbsp;relative;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&nbsp;&nbsp;&amp;::after,&nbsp;&amp;::before{</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">width</span>:&nbsp;<span style="color: black;">20%</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">height</span>:&nbsp;<span style="color: black;">100%</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;&nbsp;&nbsp;&nbsp;&nbsp;</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">position</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">:&nbsp;absolute;</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">top</span>:&nbsp;<span style="color: black;">0</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">z-index</span>:<span style="color: black;">2</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">content</span>:&nbsp;<span style="color: black;">""</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;&nbsp;&nbsp;&nbsp;&nbsp;</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">bac<span style="color: black;">公斤</span>round</span>:&nbsp;<span style="color: black;">#1e5799</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;&nbsp;</p><span style="color: black;">bac<span style="color: black;">公斤</span>round</span>:&nbsp;<span style="color: black;">-moz-linear-gradient</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(top,&nbsp;#1e5799&nbsp;0%,&nbsp;#7db9e8&nbsp;100%);&nbsp;</p><span style="color: black;">bac<span style="color: black;">公斤</span>round</span>:&nbsp;<span style="color: black;">-webkit-linear-gradient</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(top,&nbsp;#1e5799&nbsp;0%,#7db9e8&nbsp;100%);</p><span style="color: black;">bac<span style="color: black;">公斤</span>round</span>:&nbsp;<span style="color: black;">linear-gradient</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(to&nbsp;bottom,&nbsp;#1e5799&nbsp;0%,#7db9e8&nbsp;100%);&nbsp;</p><span style="color: black;">filter</span>:&nbsp;progid:DXImageTransform.Microsoft.<span style="color: black;">gradient</span>(&nbsp;startColorstr=<span style="color: black;">#1e5799</span>,&nbsp;endColorstr=<span style="color: black;">#7db9e8</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">,GradientType=0&nbsp;);&nbsp;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&nbsp;&nbsp;}</p>&nbsp;&nbsp;&amp;<span style="color: black;">::after</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">{</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">border-radius</span>:&nbsp;<span style="color: black;">100%</span>&nbsp;<span style="color: black;">0%</span>&nbsp;<span style="color: black;">0%</span>&nbsp;<span style="color: black;">100%</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;&nbsp;&nbsp;&nbsp;</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">right</span>:&nbsp;<span style="color: black;">0</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&nbsp;&nbsp;}</p>&nbsp;&nbsp;&amp;<span style="color: black;">::before</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">{</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">border-radius</span>:&nbsp;<span style="color: black;">0</span>&nbsp;<span style="color: black;">100%</span>&nbsp;<span style="color: black;">100%</span>&nbsp;<span style="color: black;">0</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;&nbsp;&nbsp;&nbsp;</p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: black;">left</span>:&nbsp;<span style="color: black;">0</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">}</p><span style="color: black;">body</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">{</p>&nbsp;&nbsp;<span style="color: black;">bac<span style="color: black;">公斤</span>round</span>:&nbsp;<span style="color: black;">#1e5799</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;&nbsp;</p><span style="color: black;">bac<span style="color: black;">公斤</span>round</span>:&nbsp;<span style="color: black;">-moz-linear-gradient</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(top,&nbsp;#1e5799&nbsp;0%,&nbsp;#7db9e8&nbsp;100%);&nbsp;</p><span style="color: black;">bac<span style="color: black;">公斤</span>round</span>:&nbsp;<span style="color: black;">-webkit-linear-gradient</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(top,&nbsp;#1e5799&nbsp;0%,#7db9e8&nbsp;100%);</p><span style="color: black;">bac<span style="color: black;">公斤</span>round</span>:&nbsp;<span style="color: black;">linear-gradient</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(to&nbsp;bottom,&nbsp;#1e5799&nbsp;0%,#7db9e8&nbsp;100%);&nbsp;</p><span style="color: black;">filter</span>:&nbsp;progid:DXImageTransform.Microsoft.<span style="color: black;">gradient</span>(&nbsp;startColorstr=<span style="color: black;">#1e5799</span>,&nbsp;endColorstr=<span style="color: black;">#7db9e8</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">,GradientType=0&nbsp;);&nbsp;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">}</p><span style="color: black;">你<span style="color: black;">亦</span><span style="color: black;">能够</span>去这个完成查看CSS样式的<span style="color: black;">实质</span>运行效果:</span><span style="color: black;">https://codepen.io/jean-jordan/pen/KeKaBw</span><span style="color: black;"><span style="color: black;">刚才</span><span style="color: black;">咱们</span>画的那幅画像不像人的脖子?好的,<span style="color: black;">咱们</span>再回到人像画上,Diana绘制<span style="color: black;">名人</span>的脖子<span style="color: black;">亦</span>是类似的过程。</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">在上面这张图里,<span style="color: black;">咱们</span>看到了Diana<span style="color: black;">怎样</span>逐步改形状,<span style="color: black;">最后</span>得到了油画中<span style="color: black;">名人</span>的脖子。</span><span style="color: black;"><span style="color: black;">然则</span>仅仅会画<span style="color: black;">各样</span>几何形状,是<span style="color: black;">没</span>法生成艺术品的,Diana总结了她在绘图中的<strong style="color: blue;">5</strong>个<span style="color: black;">要紧</span>CSS属性。</span><span style="color: black;">1、<strong style="color: blue;">边界半径</strong>(border-radius)</span><span style="color: black;">边界半径是为了让矩形的边角过渡得更自然,<span style="color: black;">针对</span>大<span style="color: black;">都数</span>网页<span style="color: black;">研发</span>者来说,只需一个参数border-radius,<span style="color: black;">能够</span>设定<span style="color: black;">区别</span>的半径数值。</span><span style="color: black;">border-radius</span>:&nbsp;15<span style="color: black;">px</span>&nbsp;10<span style="color: black;">px</span>&nbsp;40<span style="color: black;">px</span>&nbsp;30<span style="color: black;">px</span>&nbsp;/&nbsp;40<span style="color: black;">px</span>&nbsp;10<span style="color: black;">px</span>&nbsp;15<span style="color: black;">px</span>&nbsp;30<span style="color: black;">px</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p><span style="color: black;">2、<strong style="color: blue;">盒子<span style="color: black;">暗影</span></strong>(box-shadow)</span><span style="color: black;">对多个盒子<span style="color: black;">暗影</span>进行分层是<span style="color: black;">增多</span>深度的最佳<span style="color: black;">办法</span>之一。框<span style="color: black;">暗影</span>将粘附到html容器的边缘,<span style="color: black;">亦</span>会沿着边界半径定义的边缘。</span><span style="color: black;">box-shadow</span>:&nbsp;6<span style="color: black;">px</span>&nbsp;<span style="color: black;">-11px</span>&nbsp;20<span style="color: black;">px</span>&nbsp;1<span style="color: black;">px</span>&nbsp;<span style="color: black;">red</span>,&nbsp;<span style="color: black;">-15px</span>&nbsp;<span style="color: black;">-15px</span>&nbsp;5<span style="color: black;">px</span>&nbsp;<span style="color: black;">-10px</span>&nbsp;<span style="color: black;">blue</span>,&nbsp;<span style="color: black;">inset</span>&nbsp;5<span style="color: black;">px</span>&nbsp;5<span style="color: black;">px</span>&nbsp;35<span style="color: black;">px</span>&nbsp;10<span style="color: black;">px</span>&nbsp;<span style="color: black;">green</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p><span style="color: black;"><span style="color: black;">研发</span>者<span style="color: black;">能够</span>指定模糊半径,以及<span style="color: black;">暗影</span>是向内延伸还是向外延伸。</span><span style="color: black;">3、<strong style="color: blue;">变形</strong>(transform)</span><span style="color: black;">变形的<span style="color: black;">重点</span>方式有:旋转(rotate)、缩放(scale)和倾斜(skew)。</span><span style="color: black;">transform</span>:&nbsp;<span style="color: black;">rotate</span>(<span style="color: black;">-45deg</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">)</p><span style="color: black;">transform</span>:&nbsp;<span style="color: black;">scale</span>(0<span style="color: black;">.7</span>,&nbsp;1<span style="color: black;">.3</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">)</p><span style="color: black;">transform</span>:&nbsp;<span style="color: black;">skew</span>(25<span style="color: black;">deg</span>,&nbsp;30<span style="color: black;">deg</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">);</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p><span style="color: black;"><span style="color: black;">另外</span>还有透视,让物体产生远小近大的视觉效果,<span style="color: black;">或</span>是仅仅为画出一个梯形。</span><span style="color: black;">transform</span>:&nbsp;<span style="color: black;">perspective</span>(10<span style="color: black;">px</span>)&nbsp;<span style="color: black;">rotateY</span>(5<span style="color: black;">deg</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">);</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p><span style="color: black;">4、<strong style="color: blue;">线性梯度</strong>(linear-gradient)和<strong style="color: blue;">径向梯度</strong>(radial-gradient)</span><span style="color: black;">线性梯度用于定义一个方向上的渐变效果,径向梯度用于定义圆和椭圆形的渐变效果。</span><span style="color: black;">bac<span style="color: black;">公斤</span>round-image</span>:&nbsp;<span style="color: black;">linear-gradient</span>(0<span style="color: black;">deg</span>,&nbsp;<span style="color: black;">blue</span>,&nbsp;<span style="color: black;">transparent</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&nbsp;60%),</p><span style="color: black;">radial-gradient</span>(<span style="color: black;">circle</span>&nbsp;<span style="color: black;">at</span>&nbsp;70%&nbsp;30%,&nbsp;<span style="color: black;">purple</span>,&nbsp;<span style="color: black;">transparent</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">&nbsp;40%);</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p><span style="color: black;">5、<strong style="color: blue;">层叠</strong>(overflow)</span><span style="color: black;">层叠是一种将<span style="color: black;">海量</span>杂乱元素填充到一个整齐的包中的<span style="color: black;">办法</span>,<span style="color: black;">能够</span>创建<span style="color: black;">有些</span>有趣的形状。在变形那部分的<span style="color: black;">基本</span>上<span style="color: black;">运用</span>hidden参数,<span style="color: black;">能够</span>把边缘遮盖起来。</span><span style="color: black;">overflow</span>:&nbsp;<span style="color: black;">hidden</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p><span style="color: black;">以上5种元素缺一不可,随便少一种都会产生怪异的效果。</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p><span style="color: black;"><strong style="color: blue;">△</strong>从左至右分别是缺少边界半径、<span style="color: black;">暗影</span>、变形、梯度、层叠的效果(点击查看大图)</span><span style="color: black;"><span style="color: black;">不外</span>即使<span style="color: black;">这般</span>,<span style="color: black;">亦</span><span style="color: black;">特别有</span>抽象艺术的美感,仿佛在看毕加索的作品。</span>
    <h2 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">只适用于Chrome</span></h2><span style="color: black;"><span style="color: black;">不外</span>,<span style="color: black;">因为</span>这是一个纯个人艺术创作,Diana小姐姐并不关心浏览器适配性。</span><span style="color: black;"><span style="color: black;">因此呢</span>,这些代码在Chrome里<span style="color: black;">能够</span>完美展现,但<span style="color: black;">倘若</span>用其他浏览器打开,可能就会<span style="color: black;">显现</span>不<span style="color: black;">同样</span>的效果。</span><span style="color: black;"><span style="color: black;">例如</span>,MAC上的Safari浏览器打开,妹子的眼睛就方了:</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p><span style="color: black;">肩膀上的高光,变<span style="color: black;">成为了</span>一个大圈圈:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">胸前的礼服上,<span style="color: black;">亦</span>被泼了一道墨:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;"><span style="color: black;">倘若</span>用<span style="color: black;">初期</span>的Chrome打开,会<span style="color: black;">显现</span>惊悚的头身分离的效果:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;"><span style="color: black;">初期</span>的Opera浏览器,打开之后脸方了:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">Windows 7上从IE 6到IE 11,<span style="color: black;">表示</span>出来的都是这个鬼样子:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">浓重的线条,<span style="color: black;">乃至</span>有点抽象艺术的感觉。</span><span style="color: black;"><span style="color: black;">一样</span>是<span style="color: black;">初期</span>IE,放到Mac上<span style="color: black;">亦</span><span style="color: black;">同样</span>鬼畜,这是IE 5.1.7的效果:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">还有人试了试,在Windows 98系统的IE 7浏览器打开,会变成非常像素风的样子:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">最恐怖的是三星手机上的夜间模式打开:</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">连人种都变了啊!</span><span style="color: black;">其他的几张画,换个浏览器打开<span style="color: black;">亦</span>比较鬼畜。</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">拉夫领变得透明而有光泽,领口的蕾丝干脆断掉了,仿佛是逃难时期的肖像画。</span><span style="color: black;">最后,<span style="color: black;">倘若</span>你在iPhone上装了Chrome,出来的<span style="color: black;">亦</span>是Safari的效果,想看完整效果的话,请在安卓手机<span style="color: black;">或</span>电脑的Chrome上打开。</span>
    <h2 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">反向绘图</span></h2><span style="color: black;">CSS太难,学不会?<span style="color: black;">没关系</span>,虽然<span style="color: black;">咱们</span><span style="color: black;">不可</span>把代码变成<span style="color: black;">照片</span>,<span style="color: black;">然则</span><span style="color: black;">能够</span>把<span style="color: black;">照片</span>变成代码啊。</span><span style="color: black;">没错,<span style="color: black;">便是</span><strong style="color: blue;">ASCII艺术</strong>,早在DOS时期,就有人用命令行界面来<span style="color: black;">表示</span><span style="color: black;">照片</span>。直到今天已<span style="color: black;">作为</span>一种流行的互联网文化。</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"><span style="color: black;">用单色字符来画出世界名画<span style="color: black;">已然</span>不算<span style="color: black;">鲜嫩</span>事。<span style="color: black;">近期</span>又有个码农<span style="color: black;">研发</span>了一个新的项目<strong style="color: blue;">Primg</strong>,让任何一幅画都<span style="color: black;">能够</span>用质数来<span style="color: black;">暗示</span>。</span><span style="color: black;"><span style="color: black;">例如</span>蒙拉丽莎,就<span style="color: black;">能够</span>用一个3万位的质数二进制方式绘制出来。</span><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;">
    <h2 style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">传送门:</span></h2><span style="color: black;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">作者的GitHub:</p>https://github.com/cyanharlow
    </span><span style="color: black;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">作者博客主页:</p>https://diana-adrianne.com/
    </span><span style="color: black;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">教程:</p>https://css-tricks.com/solving-lifes-problems-with-css/
    </span><span style="color: black;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">用质数生成任意ASCII艺术:</p>https://github.com/geonnave/primg
    </span><span style="color: black;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">晓查&nbsp;郭一璞 发自 凹非寺</p>量子位 <span style="color: black;">报告</span> | 公众号 QbitAI
    </span><span style="color: black;">作者丨关注前沿科技</span><span style="color: black;">系网易<span style="color: black;">资讯</span>·网易号“各有态度”签约作者</span><span style="color: black;">本文观点不<span style="color: black;">表率</span>我方观点</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">·END·</strong></p><span style="color: black;"><strong style="color: blue;">往期精选内容<span style="color: black;">举荐</span></strong></span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><span style="color: black;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></span></a></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><span style="color: black;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></span></a></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><span style="color: black;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></span></a></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p>




听听海 发表于 2024-8-28 08:43:28

谷歌外链发布 http://www.fok120.com/

nykek5i 发表于 2024-10-14 22:43:15

楼主节操掉了,还不快捡起来!

1fy07h 发表于 2024-10-27 07:33:13

百度seo优化论坛 http://www.fok120.com/

7wu1wm0 发表于 2024-11-5 20:35:46

太棒了、厉害、为你打call、点赞、非常精彩等。
页: [1]
查看完整版本: 代码变油画,前端小姐姐只用HTML+CSS就能做到,让美术设计亦惊叹丨GitHub热榜