Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一行文本,其中包含一个文本字段和一个下拉列表。在窄屏幕上,行溢出,列表粘在文本字段上。是否可以控制溢出行的垂直间距而不影响原始非溢出行的间距?如果我只是添加额外的垂直空间,它将在溢出和非溢出视图中产生更大的间距。
没有示例很难看出,但您可以尝试使用媒体查询来添加样式。您可以将断点更改为表单换行的点。我600px现在用过,但你的可能会有所不同。例如,如果您的文本字段有一个类.my-text-input:
600px
.my-text-input
@media only screen and (max-width: 600px) { .my-text-input { margin-bottom: 10px; } }