html - 使用纯CSS在箭头周围画圈

标签 html css

我有一个使用纯 CSS 创建的按钮。

在鼠标悬停在按钮上时,箭头从上到下进行动画处理。我想在箭头外创建一个圆圈。所以圆圈应该包含箭头。

我不确定这是否可能。我做了一些 Google 研究,但没有找到合适的东西。

<a href="#" class="button">
  <span>Hover Me</span>
</a>

fiddle 是here

最佳答案

如果我理解你的话,是这样的:

.button span:before {
    content:' ';
    position: absolute;
    top: 0px;
    right: -18px;
    opacity: 0;
    width: 30px;
    height: 30px;
    margin-top: -19px;
    border-radius: 50%;
    background: #000;
    transition: opacity 0.2s, top 0.2s, right 0.2s;
}

演示:http://jsfiddle.net/DFNn9/4/

关于html - 使用纯CSS在箭头周围画圈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19571577/

相关文章:

html - 使用 Jade 迭代获取键和索引

html - 无法定位具有特定样式的列表中的链接

html - SVG 网格(图案)在 Firefox 中行为不当

CSS 样式声明重用

javascript - 为每个 img 分配一个不同的随机类

javascript - 如何在按钮组中输出变量以影响 Angular.js 和 Html 中的下拉结果

html - 如何卡住表格的标题和左列

html - 滚动不启用

css - Bootstrap 3 : Sticky Footer inside row/col class

javascript - JSX 样式变量 : Combining Multiples