中国结制作

css部分

             //设置背景图层
            .box{
				width: 300px;
				height: 300px;
				background-color: blue;
				position: relative;
				top: 60px;
				left: 180px;
				
			}
			.tux1{
				width: 40px;
				height: 130px;
				position: absolute;//定位
				border-radius: 30px 30px 0px 0px;//设置圆角四个边
				border: 10px solid red;//设置边框大小颜色
				top: 97px;
				left:307px;
				transform: rotate(45deg);//设置角度
				
			}
			.tux2{
				width: 40px;
				height: 130px;
				position: absolute;
				border-radius: 30px 30px 0px 0px;
				border: 10px solid red;
				top: 97px;
				left: 307px;
				transform: rotate(-45deg);
			}
			.tux3{
				width: 40px;
				height: 130px;
				position: absolute;
				border-radius: 30px 30px 0px 0px;
				border: 10px solid red;
				top: 162px;
				left: 305px;
				transform: rotate(135deg);
			}
			.tux4{
				width: 40px;
				height: 130px;
				position: absolute;
				border-radius: 30px 30px 0px 0px;
				border: 10px solid red;
				top: 162px;
				left: 309px;
				transform: rotate(225deg);
			}
			.tux5{
				width: 40px;
				height: 40px;
				position:absolute;
				border-radius: 30px 0px 30px 30px;
				border: 10px solid red;
				top: 174px;
				left: 203px;
				transform:rotate(45deg);
			}
			.tux6{
				width:40px;
				height:40px;
				position:absolute;
				border-radius:30px 30px 30px 0px;
				border:10px solid red;
				top: 174px;
				left: 411px;
				transform: rotate(45deg);
			}

HTML部分

		<div class="box"></div>
		<div class="tux1"></div>
		<div class="tux2"></div>
		<div class="tux3"></div>
		<div class="tux4"></div>
		<div class="tux5"></div>
		<div class="tux6"></div>

效果图

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值