css - 在将 bg_img 隐藏到 img 时没有出现后
问题描述
在使用@media queries
时,我目前正在uk-hidden@m
为我的img {}
班级使用,并将我的bg_img {}
班级与uk-visible@m
. 这就是它们的样子:
(bg_img uk-visible@m)
.bg-image {
position: relative;
height: ~px;
width: ~px;
box-shadow: 10px 11px 10px 1px rgba(0, 0, 0, 0.25);
&::after {
position: absolute;
content: '';
bottom: -46px;
left: 0;
height: 46px;
width: 80%
background-color: #DCCA7E;
z-index: -1;
}
@include breakpoint(small down) {
height: 46.72;
}
}
(img uk-hidden@m)
img {
&::before {
position: absolute;
content: '';
bottom: -46px;
left: 0;
height: 46px;
width: 80%;
background-color: #DCCA7E;
z-index: -1;
}
@include breakpoint(medium down) {
max-width: 140%;
}
}
我&::after
没有出现在媒体屏幕上之前的媒体屏幕,img{}
隐藏和bg_img {}
出现的大小。我想了解为什么会发生这种情况,以防止将来发生这种情况。
感谢那些花时间的人!:)
解决方案
推荐阅读
- powershell - 恢复 Powershell 功能
- vba - ma 访问:发送对象出错返回表单
- python - 使用 pip 安装 discord.py 的 Python 问题
- javascript - 嵌套的 javascript 事件侦听器是否有更简洁的模式?
- c# - 我只在视图模型类中获得组合框选定项,但不能在视图模型类之外使用它,它的抛出为空
- prolog - Prolog 压缩与合并排序
- api - 我是否应该假设 API 总是返回其文档所说的内容?
- scala - 用于递归泛型定义的 Scala 通配符
- svelte - 如果数据不存在或已经使用 Svelte / Sapper 获取了 svelte 类型的 store id 数据,如何有效地从 rest api 获取数据
- intellij-idea - Intellij 2020.1.2:为什么暂存文件给出不同的输出?