鍍金池/ 問答/HTML5  數(shù)據(jù)庫  HTML/ html如何做出這種半圓

html如何做出這種半圓

clipboard.png

回答
編輯回答
陌南塵
<!DOCTYPE html>
<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">
    <style>
        .circle {
            width: 100px;
            height: 100px;
            border: 20px solid #000;
            border-radius: 50%;
            border-left-color: transparent;
            border-top-color: transparent;
            transform: rotate(-45deg);
        }
    </style>
</head>
<body>
<div class="circle"></div>
</body>
</html>

這個半圓用SVG寫的話也是挺簡單的。

2017年11月9日 11:22