相关疑难解决方法(0)

在A标签上设置宽度和高度

是否可以在锚标记上设置像素的宽度和高度?我想让锚标签有一个背景图像,同时保留锚内的文本.

li {
  width: 32px;
  height: 32px;
  background-color: orange;
}

li a {
  width: 32px;
  height: 32px;
  background-color: red;
}
Run Code Online (Sandbox Code Playgroud)
<li><a href="#">Something</a></li>
Run Code Online (Sandbox Code Playgroud)

html css cross-browser

124
推荐指数
4
解决办法
14万
查看次数

文本换行按钮

我有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;
  }
}
Run Code Online (Sandbox Code Playgroud)
<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>
Run Code Online (Sandbox Code Playgroud)

html css word-wrap

7
推荐指数
1
解决办法
2万
查看次数

标签 统计

css ×2

html ×2

cross-browser ×1

word-wrap ×1