html - 为什么输入的宽度错误?
问题描述
我希望输入为 30vmin 宽 - 也就是说,容器作为最大元素 - (计数器),输入作为一个块,直到比例增加 300% 以上。然后一切都崩溃了。我该如何解决这个问题...确保输入永远不是块中的最大元素
<div class="main">
<div class="counter"></div>
<input type="range" />
</div>
<style>
.main {
width: max-content;
}
.counter {
width: 30vmin;
}
input {
width: 100%;
}
</style>
解决方案
只需删除应用于 .main 的 css
.main { width: max-content; }
推荐阅读
- azure - Azure 的 Kubernetes 清单文件
- python - opencv python AttributeError
- python-3.x - 为什么我不能从 python 的异常中返回我的局部变量?
- python - sudo pip 成功安装后的 ModuleNotFoundError
- excel - 无法使用宏关闭excel
- facebook - Facebook 通知发送到个人信使帐户
- swift - 防止手势通过注释视图进入地图
- python - 是否可以从 Python 中“双重”导入?
- python - if, else 语法并将数据添加到新字段
- android - Android Studio 3.2 添加自定义大小的图像(不是图标)