div底边的半圆?

Semi-circle on the bottom side of a div?

我需要一个半圆作为div的底部边框(不是圆角),像这样。

这是 div 代码:

#navlogo img {
position:fixed;
width: 180px;
height: 180px;
z-index: 2;
left:45%;
top:0;
background-color:#CCC;

非常感谢任何帮助!

border-radius 可以解决问题,抱歉没有更好地措辞

您需要 border-bottom-left-radius: 50%border-bottom-right-radius: 50%;

jsFiddle: https://jsfiddle.net/ufar4mrj/

据我所知,只有几种方法可以在网页中包含圆形:

  • border-radius(圆角)
  • 图片
  • SVG
  • 快闪

考虑到你要做的事情,SVG和Flash都不在话下,留给你的只有图片和圆角。我不知道你为什么拒绝使用 border-radius 因为它工作得很好。您找不到任何可以更好地集成到网页中的东西。