为了账号安全,请及时绑定邮箱和手机立即绑定

Bootstrap:为什么我的 col-md-6 不工作?

Bootstrap:为什么我的 col-md-6 不工作?

森栏 2023-10-10 15:08:42
我的网站有一点问题。我想要一个使用 Bootstrap 的响应式网站。在我的移动版本中,两列需要彼此重叠,现在是正确的。但是,在我的桌面版本上,各列需要彼此相邻。我认为 col-md-6 是执行此操作的正确方法,但是出了问题...任何人都可以向我解释我做错了什么。?body {  padding: 0;  margin: 0;  background: #f2f6e9;  padding-left: 20px;}.clearfix:after {  content: ".";  display: block;  height: 0;  clear: both;  visibility: hidden;}.container {  margin-top: 20px;  font-family: 'Roboto', sans-serif;}.content {  margin-top: 30px;}.tekstgeel{  color: #d7a32d;}.tekstgroen{  color: #4a7b45;}.bold {  font-weight: bold;}.lijngeel{  height:4px;  width: 50px;  background-color: #d7a32d;  float: left;  margin-top: 10px;}img {  width: 100%;}.titel {  font-size: 15px;  text-transform: uppercase;  line-height: 18px;}p {  font-size: 12px;}#profielfoto {  width: 75%;  margin-top: 15px;  margin-bottom: 40px;}.titel {  font-size: 15px;  text-transform: uppercase;  line-height: 18px;}.ondertitel {  font-size: 13px;  text-transform: uppercase;  line-height: 16px;  margin-top: 15px;  margin-bottom: 15px;}@media only screen and (min-device-width: 768px) {.titel {  font-size: 20px;  line-height: 23px;}.col-md-6 {  border:1px solid black;}}
查看完整描述

1 回答

?
回首忆惘然

TA贡献1847条经验 获得超11个赞

请div row class在 之间添加two div columns。


<div class="row">

      <div class="col-md-12">

         <div class="row">

            <div class="col-sm-12 col-md-6">

           </div>

        </div>

     </div>

</div>


查看完整回答
反对 回复 2023-10-10
  • 1 回答
  • 0 关注
  • 53 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信