css - 同一个元素可以做凹 Angular 和圆 Angular 吗?

标签 css progress-bar

我需要它看起来像这样:enter image description here

这是标记:

<div class="hni_vaBreadcrumbContainer">
  <progress class="hni_vaBreadcrumbProgress" value="0" max="100"></progress>
  <span class="hni_vaBreadcrumbContent">0%</span>
</div>

这是我试过但无法工作的几个 jfiddles: http://jsfiddle.net/x4wLf/ , http://jsfiddle.net/cogent/6A5Lb/

我可以只为百分比文本使用背景图片,但更喜欢所有 CSS。

谢谢!

最佳答案

我想我实际上用很少的标记/css 就解决了这个问题。

http://jsfiddle.net/o22b4uyz/2/

标记

<div class='wrapper'>
  <div class='concave'><span class="percent">20%</span></div>
</div>

CSS

div.wrapper {
    background:blue;
    width:80px;
    height:20px;
    position:relative;
    border-radius: 50px;
} 
div.concave {
    position:absolute;
    background:white;
    width:20px;
    height:20px;
    border-radius:50px;
left:-3px;
    }
span.percent {
    padding-left: 40px;
    color: #fff;
}

关于css - 同一个元素可以做凹 Angular 和圆 Angular 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25985034/

相关文章:

css - 如何为最初位于屏幕外的元素的不透明度设置动画?

javascript - CSS 三 Angular 形定位

php - 垂直 WP 导航菜单没有将所有 <li> 元素居中,只是一些

c#-4.0 - 如何使用 C# 使用 VSTO wordAddIn 2010 访问 native Word 应用程序进度条

javascript - 使用 javascript 添加 html 元素会使其他 js 变得不稳定

javascript - HTML5 音频进度条长度

html - 仅CSS的砌体布局

html - 什么是更好的方法,float 或 display-inline?

android - 角不适用于android drawable中的环形

android - 如何在android中创建加载屏幕?