我有 4 个a
标签。每个 CSS 中的所有内容都有效。它可以完美地调整我手机上的按钮大小。我唯一的问题是在我的手机上,对于登录/注册按钮,按钮内部的文本剪切,它显示的只是登录/注册。
据我记得white-space: normal
是这样做的方法,但也许我错了。
@media only screen and (max-device-width: 480px) {
.newsButton {
width: 49%;
height: 140px;
white-space: normal;
float: left;
}
.venueButton {
width: 49%;
height: 140px;
white-space: normal;
float: right;
}
.learnButton {
width: 49%;
height: 140px;
white-space: normal;
float: left;
}
.loginButton {
width: 49%;
height: 140px;
white-space: normal;
float: right;
}
}
<a href="menu.php" class="newsButton" data-role="button" data-theme="e">News</a>
<a href="venue.php" class="venueButton" data-role="button" data-theme="e">Venue Hire</a>
<a href="learn.php" class="learnButton" data-role="button" data-theme="e">Learn</a>
<a href="login.php" class="loginButton" data-role="button" data-theme="e">Login/Register</a>