html - 使用 css 的圆 div 内的细箭头

标签 html css css-shapes

<分区>


关闭 8 年前

我正在尝试使用 CSS 创建一个细箭头(向右的方向)。

我已经创建了带圆圈的 div,但仍然使用箭头

<div class="circleBase type2"></div>

我已经创建了 fiddle 并附上了引用图片

http://jsfiddle.net/squidraj/c9eyrat6/

enter image description here

任何提示/建议/引用链接都可以。提前致谢。

最佳答案

这是一个使用伪元素的选项,尽管图像或 SVG 可能更可取。

JSfiddle Demo

CSS

.circleBase {
    border-radius: 50%;
    behavior: url(PIE.htc); /* remove if you don't care about IE8 */
    overflow: hidden;
    box-sizing: border-box;
}

.type2 {
    width: 50px;
    height: 50px;
    background: #ccc;
    border: 3px solid #000;
    position: relative;
}

.type2:before {
    content:"";
    position: absolute;
    top:0;
    right:50%;
    width:100%;
    height:100%;
    border:2px solid white;
    transform:rotate(45deg) ;

}

关于html - 使用 css 的圆 div 内的细箭头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26276597/

上一篇:javascript - 回调函数中未声明的变量

下一篇:html - Bootstrap : align elements to bottom of column

相关文章:

Javascript 选择和比较复选框

css - 一次使用多个特定于供应商的 CSS 选择器

css - WP Twentyseventeen 菜单颜色更改不起作用

css - 使用 scaleZ 挤出效果

html - 如何在 CSS 和 HTML 中创建价格标签形状

javascript - 在 mozilla/IE 中淡出无法正常工作

javascript - 在 PHP 中向随机用户显示 html 内容

html - CSS HTML 行出现在 div :active 上

html - 溢出 x 不工作

html - 不规则形状作为链接