html - 我们如何在css中添加点凸起效果?

标签 html css

<分区>


这个问题似乎离题,因为它缺乏足够的信息来诊断问题。 更详细地描述您的问题或include a minimal example在问题本身。

关闭 9 年前

我想知道我们如何才能像在这个网站上做的那样做这个局部凸起效果:https://koding.com/ 如果你查看视频部分,你可以看到绿色圆圈有一个漂亮的 css 动画以相同的间隔重复。我在网上查了类似的教程,但找不到。

他们使用了这个类:span.intro-marker 有人知道如何制作这种效果吗?

最佳答案

首先,如果您想了解任何页面的特定元素的所有信息,请右键单击并单击“检查元素”。

大多数浏览器都有这个功能。它会详细告诉您有关您想要的特定元素的信息。在这里:

span.intro-marker {
    -moz-box-sizing: border-box;
    background: radial-gradient(circle farthest-side at center center , #1AAF5D 50%, rgba(26, 175, 93, 0.2) 57%) repeat scroll 0 0 rgba(0, 0, 0, 0);
    border: 2px solid #1AAF5D;
    border-radius: 50%;
    cursor: pointer;
    height: 52px;
    left: 0;
    overflow: visible;
    position: absolute;
    top: 0;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0s;
    width: 52px;
    z-index: 10;
}
span.intro-marker.in {
    transform: scale(1);
}
span.intro-marker.in:after {
    -moz-box-sizing: border-box;
    animation: 5s linear 3s normal none infinite homeMarkers;
    -webkit-animation: 5s linear 3s normal none infinite homeMarkers;
    background: radial-gradient(circle farthest-side at center center , rgba(26, 175, 93, 0) 70%, #1AAF5D 100%) repeat scroll 0 0 rgba(0, 0, 0, 0);
    border: 1px solid #1AAF5D;
    border-radius: 50%;
    content: "";
    height: 52px;
    left: -2px;
    opacity: 0;
    position: absolute;
    top: -2px;
    width: 52px;
}
@keyframes homeMarkers {
  5% {
    opacity: 0.6;
  }
  27% {
    opacity: 0;
    transform: scale(1.8);
  }
  100% {
    opacity: 0;
  }
}
@-webkit-keyframes homeMarkers {
  5% {
    opacity: 0.6;
  }
  27% {
    opacity: 0;
    transform: scale(1.8);
  }
  100% {
    opacity: 0;
  }
}
@-moz-keyframes homeMarkers {
  5% {
    opacity: 0.6;
  }
  27% {
    opacity: 0;
    transform: scale(1.8);
  }
  100% {
    opacity: 0;
  }
}

工作 jsFiddle , 在 Firefox 中测试

关于html - 我们如何在css中添加点凸起效果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22065655/

上一篇:html - 如何水平居中对齐div内的跨度

下一篇:html - 将div拉伸(stretch)成固定宽度的div

相关文章:

javascript - 无法使用 JQuery 功能切换图像

python - HTML 不在 django 中提供图像

jquery - float 与绝对定位难题

html - 高度未拉伸(stretch)至 100%

css - 在 React-Native 中将图像包含到特定 block 中

java - 在网页中发送 MIDI 消息

html - padding destroying div 变成一个div

python - 在 Python 中清理 HTML 解析

html -::selection 伪选择器忽略::before 伪元素

javascript - jquery 用于下拉选择