gpt4 book ai didi

html - 在网页中定义多个区域(没有多边形)

转载 作者:太空宇宙 更新时间:2023-11-03 20:51:19 25 4
gpt4 key购买 nike

我想知道是否可以在网页中定义多个区域。我不是在谈论经典的矩形划分(由“div”制作),而是更多:定义各种形状的区域,也许不是多边形,如下图所示。

web page divided in not polygonal shapes

很多事情我都不知道:

  • 我不知道是否可行;
  • 根据 GUI 创建理论,我不知道这是否是一个好的做法;
  • 我不知道如果可以构建这样的东西,它是否也与大多数浏览器兼容(我不介意)。

构建这样的页面,也许是一件疯狂的事情,以我的经验不足,我不知道。我只是想从这个意义上理解 html 和 css 的潜力和局限性。

谢谢。

最佳答案

您可以通过这种方式(例如)使用 CSS 创建圆形 DIV:

.circle {
border-radius: 50%;
}

.circle1 {
width: 100px;
height: 100px;
background: yellow;
border: 3px solid red;
}
.circle2 {
width: 50px;
height: 50px;
background: #ccc;
border: 3px solid #000;
}

并在您的 DIV 中使用此 CSS:

<div class="circle circle1"></div>

<div class="circle circle2"></div>

关于html - 在网页中定义多个区域(没有多边形),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15639637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com