html - 最小化页面时如何修复css中的菜单栏和容器
问题描述
看图,我不知道真正的问题是什么。
带有按钮的搜索栏和带有“PROFILE”文本的框给我一个问题
.profile{
width: 300px;
height: 300px;
background-color: white;
border: 1px solid lightgrey;
border-radius: 5px;
position: absolute;
right: 50px;
top: 80px;
}
.srch{
width: 500px;
height: 30px;
border-radius: 2px;
border: 1px solid white;
margin-left: 150px;
padding-left: 8px;
}
.sub{
background: none;
border: 2px solid red;
border-radius: 2px;
color:white;
font-weight: bold;
font-size: 14px;
width: 100px;
height: 35px;
}
解决方案
考虑在 HTML 中使用 CSS,你为什么不尝试使用 Bootstrap?它真的很有用,它可以在调整窗口大小时正确调整元素的大小和重新定位。它会做出响应。您可以使用它的类(如 )来做到这一点。在这里,观看布局网格文档,它应该可以解决您的问题
推荐阅读
- c++ - 从 macports (macOS) 安装 gcc 8 的 gdb libstdc++ 漂亮打印机中的错误
- git - Git 和开源/社区项目中程序员之间的协调——它是如何工作的?
- node.js - git commit 添加了 2 个新行
- angular - 如何在 html 模板中实现这一点
- sqlite - 关联 2 个表的 SQL 查询
- python - 使 Jupyter 笔记本中的后续状态无效
- sql - 我的计划命令删除了我的所有记录
- unicode - Unicode 字符代表“全屏”?
- python - 属性错误 ::datetime.date 对象没有属性“拆分”
- java - Java在循环中绘制移动矩形