响应式 CSS 没有 bootstrap

responsive CSS without bootstrap

我正在开发一个网页,我有一个 CSS 横向文件和一个纵向视图文件,但是在移动设备上,当我开始以纵向模式在文本框中键入内容时,它会自动更改为景观。我该如何解决这个问题?

我知道 bootstrap 但这对我来说太晚了,因为我的页面太多,所以如果可能的话我需要一个没有它的解决方案。

Bootstrap只会让你的生活变得轻松。此外,您可以针对不同的设备分辨率和方向使用媒体查询... 这个存储库是识别媒体查询的最佳资源之一: CSS media queries

有很多服务可以解决这个问题。 你可以使用 Bootstrap, Foundation for both e-mails and sites or Semantic UI. If you want to use as react component than maybe Material UI is the best. If you want to use many animations you can get UIkit. For just simple things the Skeleton 是最好的,它简单、快速,但不如其他框架聪明。