html怎么将矩形去掉一个角,DIV+CSS如何在一个矩形中挖去一个半圆?

要挖个半圆没办法,但是可以通过多个div拼接来做出效果

半圆用一个透明div来做,登陆框的背景用透明圆形div的border来模拟

看了前面几个回答提主的描述,感觉应该是要这种效果

bVttes

css

.square, .square > div { box-sizing: border-box; }

.square {

width: 300px;

position: fixed;

top: calc(50vh - 200px);

left: calc(50vw - 150px);

overflow: hidden;

}

.square > .s-top {

border: 1px solid #fff;

height: 170px;

border-radius: 5px 5px 0 0;

border-width: 1px 1px 0 1px;

}

.square > .s-middle {

border-left: 1px solid #fff;

height: 60px;

}

.square > .s-bottom {

border: 1px solid #fff;

height: 170px;

border-radius: 0 0 5px 5px;

border-width: 0px 1px 1px 1px;

}

.square > .s-half-circle {

border: 1px solid #fff;

position: absolute;

width: 30px;

height: 60px;

border-width: 1px 0px 1px 1px;

border-radius: 30px 0 0 30px;

top: calc(50% - 30px);

right: 0;

}

.square > .s-background {

border: 360px solid rgba(255,255,255,0.3);

position: absolute;

width: 780px;

height: 780px;

border-radius: 50%;

top: calc(50% - 390px);

right: -390px;

}

.circle {

width: 50px;

height: 50px;

border: 1px solid #fff;

border-radius: 50%;

position: absolute;

top: calc(50% - 25px);

left: calc(50% + 125px);

background-color: rgba(255,255,255,.3);

box-sizing: border-box;

}

html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值