- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在左下角产生涟漪效应。我希望看到的涟漪效应只显示在英雄区域(100% 的视网膜),而不是溢出到其他部分。
我以为我可以用“溢出:隐藏”来隐藏它,但我似乎错了。
我希望这个对我想要的解释是清楚的。如果我不是,请告诉我。
前端开发新手
.hero-body {
background: #3399ff;
height: 100%;
}
.circle {
position: absolute;
border-radius: 0 50% 0 0;
background: white;
animation: ripple 15s infinite;
box-shadow: 0px 0px 1px 0px #508fb9;
}
.small {
width: 200px;
height: 200px;
left: -100px;
bottom: -100px;
}
.medium {
width: 400px;
height: 400px;
left: -200px;
bottom: -200px;
}
.large {
width: 600px;
height: 600px;
left: -300px;
bottom: -300px;
}
.xlarge {
width: 800px;
height: 800px;
left: -400px;
bottom: -400px;
}
.xxlarge {
width: 1000px;
height: 1000px;
left: -500px;
bottom: -500px;
}
.shade1 {
opacity: 0.2;
}
.shade2 {
opacity: 0.5;
}
.shade3 {
opacity: 0.7;
}
.shade4 {
opacity: 0.8;
}
.shade5 {
opacity: 0.9;
}
@keyframes ripple {
0% {
transform: scale(0.8);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(0.8);
}
}
<div class="row justify-content-center">
<div class='ripple-background'>
<div class='circle xxlarge shade1'></div>
<div class='circle xlarge shade2'></div>
<div class='circle large shade3'></div>
<div class='circle mediun shade4'></div>
<div class='circle small shade5'></div>
</div>
</div>
最佳答案
使用位置:固定;
body {
background: #3399ff;
height: 100%;
width: 100%;
position: fixed;
}
.circle {
position: absolute;
border-radius: 0 50% 0 0;
background: white;
animation: ripple 15s infinite;
box-shadow: 0px 0px 1px 0px #508fb9;
}
.small {
width: 200px;
height: 200px;
left: -100px;
bottom: -100px;
}
.medium {
width: 400px;
height: 400px;
left: -200px;
bottom: -200px;
}
.large {
width: 600px;
height: 600px;
left: -300px;
bottom: -300px;
}
.xlarge {
width: 800px;
height: 800px;
left: -400px;
bottom: -400px;
}
.xxlarge {
width: 1000px;
height: 1000px;
left: -500px;
bottom: -500px;
}
.shade1 {
opacity: 0.2;
}
.shade2 {
opacity: 0.5;
}
.shade3 {
opacity: 0.7;
}
.shade4 {
opacity: 0.8;
}
.shade5 {
opacity: 0.9;
}
@keyframes ripple {
0% {
transform: scale(0.8);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(0.8);
}
}
<div class="row justify-content-center">
<div class='ripple-background'>
<div class='circle xxlarge shade1'></div>
<div class='circle xlarge shade2'></div>
<div class='circle large shade3'></div>
<div class='circle mediun shade4'></div>
<div class='circle small shade5'></div>
</div>
</div>
关于html - 我怎样才能隐藏我的动画圆波纹效果的溢出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56010752/
如何以编程方式将 TextView 背景设置为 xml/ripple? xml/ripple.xml: 我尝试了
我正在开发 Material Design 界面。我有一些卡片,我希望在单击时产生链式 react 。我已经按照谷歌所说的做了,但没有任何反应。这是我的代码: >
我试图将 FloatingActionButton 波纹设置为类似于 this 来自 Material 设计。 问题是我只得到一个没有波纹的“平面样式”,它只是将按钮从白色更改为橙色,而没有上面链
想象一下我有这么长的一段文字:HELLO THIS IS MY LONG SENTENCE。当我点击它时,我希望 LONG 这个词产生波纹(墨水溅起)。 假设我有这个代码: new RichText(
有人知道 Ripple 是否适用于最新的cordova 版本?因为我正在尝试,我什至无法启动控制面板。当我尝试不使用它时,会弹出一些“警报”: 差距:[“插件管理器”,“启动”,“插件管理器59084
我正在使用 google maps API,我试图让他们的交互式 map 通过 PhoneGap 工作,然后我通过 Ripple 模拟它。 我完全复制了这个教程: http://www.christi
在 Jetpack 中撰写 clickable修饰符默认使用 LocalIndication.current并显示一个绑定(bind)到边界的波纹。这看起来几乎总是很棒,但在某些情况下,圆形的、未绑定
我有一个项目列表(每个项目都包含多个元素),其中每个项目都可以单击并切换 View 。有没有办法对整个md-item-content产生链式 react ?我尝试了 class="ripple" 但这
我正在为我的移动应用程序项目使用 jquery、backbonejs、underscorejs 和 bootstrap 3。我在 ripple 中运行我的应用程序。有时我的控制台会出现这个愚蠢的错误。
我是一名优秀的程序员,十分优秀!