日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪(fǎng)問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

css3画半圆

發(fā)布時(shí)間:2023/12/31 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 css3画半圆 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

css3畫(huà)半圓de方法

(1)效果:

(2)代碼:

<html lang="en"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Document</title><style>* {margin: 0; padding: 0;}.clearfix{zoom:1;/*為IE6,7的兼容性設(shè)置*/}.clearfix:after {content: '.';display: block;height: 0;clear: both;visibility: hidden;}ul li {list-style: none;float: left;margin: 50px 0 50px 20px;text-align: center;}li {background: red;}h2 {margin-top: 20px;}.circle1 {width: 100px;height: 50px;border-radius: 50px 50px 0 0;line-height: 50px;}.circle2 {width: 50px;height: 100px;border-radius: 0 50px 50px 0;line-height: 100px;}.circle3 {width: 100px;height: 50px;border-radius: 0 0px 50px 50px;line-height: 50px;}.circle4 {width: 50px;height: 100px;border-radius: 50px 0 0 50px;line-height: 100px;}.circle5 {width: 100px;height: 100px;border-radius: 50px;line-height: 100px;}.demo { /*左半圓*/position:absolute; /*clip 屬性剪裁絕對(duì)定位元素。也就是說(shuō),只有 position:absolute 的時(shí)候才是生效的。*/width: 100px;height: 100px;border-radius: 50px;/* line-height: 50px; */clip: rect(0px 50px 100px 0px); /*唯一合法的形狀值是:rect (top, right, bottom, left)*/}.right-circle { /*右半圓*/left: 200px;clip: rect(0px 100px 100px 50px); /*唯一合法的形狀值是:rect (top, right, bottom, left)*/}</style> </head> <body><div><h2>用border-radius實(shí)現(xiàn)半圓</h2><ul class="clearfix"><li class="circle1">上邊圓</li><li class="circle2">左邊圓</li><li class="circle3">下邊圓</li><li class="circle4">右半圓</li><li class="circle5">全圓</li></ul><hr><h2>css3的clip 方法剪裁實(shí)現(xiàn)半圓</h2><p style="color: red;">clip 屬性剪裁絕對(duì)定位元素。也就是說(shuō),只有 position:absolute 的時(shí)候才是生效的。唯一合法的形狀值是:rect (top, right, bottom, left)</p><ul class="clearfix" style="position: relative;"><li class="demo">左半圓</li><li class="demo right-circle">右半圓</li><li></li></ul></div> </body> </html>

總結(jié)

以上是生活随笔為你收集整理的css3画半圆的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。