当屏幕尺寸小于600px时,我已在一个分区下创建了一个表格,并使用媒体查询对其进行了响应。 但是,当我将窗口的大小调整为小于600px时,表数据下的所有内容都来自该分区。 这是我的问题的屏幕截图:
这是我用来制作此表的代码:
About Us
HOSTING We have top class servers to serve you what you need. | HOSTING We have top class servers to serve you what you need. | HOSTING We have top class servers to serve you what you need. |
.myfirst {
width: 100%;
height: 200px;
background-color: aqua;
margin-top: 0;
}
.myheading {
margin-top: 0px;
text-align: center;
font-family: sans-serif;
}
table {
color: black;
padding: 25px 196px;
font-weight: 30;
margin-left: 75px;
}
tr {
width: 318px;
height: 29px;
}
td {
border-right: 2px solid white;
padding: 0 32px;
}
td:last-child {
border: none;
}
@media screen and(max-width:600px) {
.myfirst {
width: 100%!important;
height: 200%;
background-color: aqua;
margin-top: 0;
}
table,td,tr,span {
float: left;
clear: both;
width: 100%;
display: block;
margin: 0px;
padding: 0;
}