html网页制作图案,HTML+CSS实现画出一个太极八卦图案

c0c2fd9349b1e302f4369502dd2c0e0c.png

太极八卦是中华文化的象征。

今天我就用了html+css画出来一个太极八卦的图案,喜欢的可以拿去研究下!

代码:

太极八卦作者无陌然qq2633544207 aide技术网aidezy.com

/* CSS Document */

html, body, div, span, object, iframe,h1, h2,

h3, h4, h5, h6, p, blockquote, pre,abbr, address, cite, code,del, dfn,

em, img, ins,kbd, q, samp,small, strong, sub, sup, var,b, i,dl, dt, dd,

ol, ul, li,fieldset, form, label, legend,table, caption, tbody,

tfoot,thead,tr, th, td,article, aside, canvas, details, figcaption,

figure, footer, header, hgroup, menu, nav, section, summary,time, mark,

audio, video {

margin:0;

padding:0;

border:0;

outline:0;

vertical-align:baseline;

background:transparent;

outline-style:none;/*FF*/

}

body {

line-height:1;

}

a{

margin:0;

padding:0;

border:0;

vertical-align:baseline;

background:transparent;

}

a:hover,a:focus{

text-decoration:none;

bblr:expression(this.onFocus=this.blur());/*IE*/

outline-style:none;/*FF*/

}

table {

border-collapse:collapse;

border-spacing:0;

}

input, select {

vertical-align:middle;

}

/*css为clearfix,清除浮动*/

.clearfix::before,

.clearfix::after{

content: "";

height: 0;

line-height: 0;

display: block;

visibility: hidden;

clear: both;

}

.clearfix:after{clear:both;}

.clearfix{

*zoom:1;/*IE/7/6*/

}

li{

list-style:none;

}

a {

text-decoration: none

}

/*上面这个style为css初始化代码*/

#one{

height: 800px;

border: black solid 1px;

border-radius: 400px;

width: 800px;

background-color:#F00;

clear: both;

background: black;

}

#tow{

width: 200px;

height: 400px;

border: white solid 1px;

border-radius: 0px 200px 200px 0px;

margin: 0px 100px 0px 400px;

box-sizing:border-box;

display: block; /*转为块状元素*/

background: white;

}

#three{

width: 200px;

height: 400px;

border: black solid 1px;

border-radius: 200px 0px 0px 200px;

margin: 0px 0px 0px 200px;

box-sizing:border-box;

display: block; /*转为块状元素*/

background: black;

}

#for{

width: 100px;

height: 100px;

box-sizing:border-box;

display: block; /*转为块状元素*/

border-radius: 50px;

margin: 150px 0px 0px -50px;

background: black;

}

#six{

width: 100px;

height: 100px;

box-sizing:border-box;

display: block; /*转为块状元素*/

border-radius: 50px;

margin: 150px 0px 0px 150px;

background: white;

}

#se{

height: 800px;

border-radius: 400px 0px 0px 400px;

width: 400px;

background-color:white;

clear: both;

}

代码ZIP打包下载:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,以下是一个HTMLCSS实现太极八卦图的代码: ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>太极八卦图</title> <style> #taiji { width: 200px; height: 200px; border-radius: 50%; background: linear-gradient(90deg, #000000, #ffffff, #000000); position: relative; transform: rotate(45deg); } #taiji:before { content: ''; display: block; width: 100px; height: 100px; border-radius: 50%; background-color: #ffffff; position: absolute; top: 0; left: 50%; margin-left: -50px; } #taiji:after { content: ''; display: block; width: 100px; height: 100px; border-radius: 50%; background-color: #000000; position: absolute; bottom: 0; left: 50%; margin-left: -50px; } #taiji .yin { width: 50px; height: 50px; border-radius: 50%; background-color: #ffffff; position: absolute; top: 25px; left: 50%; margin-left: -25px; } #taiji .yang { width: 50px; height: 50px; border-radius: 50%; background-color: #000000; position: absolute; bottom: 25px; left: 50%; margin-left: -25px; } #taiji .left { width: 50px; height: 50px; border-radius: 50% 0 0 50%; background-color: #000000; position: absolute; top: 75px; left: 0; } #taiji .right { width: 50px; height: 50px; border-radius: 0 50% 50% 0; background-color: #ffffff; position: absolute; top: 75px; right: 0; } #taiji .left:before { content: ''; display: block; width: 25px; height: 50px; background-color: #ffffff; position: absolute; top: 0; left: 0; } #taiji .right:before { content: ''; display: block; width: 25px; height: 50px; background-color: #000000; position: absolute; top: 0; right: 0; } #taiji .left:after { content: ''; display: block; width: 50px; height: 50px; background-color: #000000; position: absolute; top: 0; left: 25px; border-radius: 50%; transform: rotate(45deg); } #taiji .right:after { content: ''; display: block; width: 50px; height: 50px; background-color: #ffffff; position: absolute; top: 0; right: 25px; border-radius: 50%; transform: rotate(45deg); } </style> </head> <body> <div id="taiji"> <div class="yin"></div> <div class="yang"></div> <div class="left"></div> <div class="right"></div> </div> </body> </html> ``` 这段代码会生成一个200*200大小的太极八卦图,使用了CSS3的渐变、旋转、倾斜等属性来实现。同时,八卦图内部的阴、阳两极和四个小半圆也使用了CSS来绘制。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值