h3 标签未能对空格进行无换行

问题描述

我正在尝试使“h3”标签具有“空白:无换行;”在我尝试制作的游戏的记分板内。然而,无论我把它放在哪里,我都无法让它工作。我只希望他们没有包装。你能帮我实现这个目标吗?

https://codepen.io/gingercook/pen/vYgJqpX

<!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
  <Meta charset="utf-8">
  <title>Dice Game</title>

  <link rel="shortcut icon" href="images/favicon/favicon.ico">

  <link rel="stylesheet" href="styles.css">

  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Kaushan+Script&family=Orbitron&family=Yusei+Magic&display=swap" rel="stylesheet">
</head>

<body>

  <section class="load-screen">
    <h1>Welcome to Dice Game</h1>
    <h2>Please write down the names of the contestants...</h2>

    <form class="" action="index.html" method="post">
      <fieldset>
        <legend>Please provide the @R_148_4045@ion...</legend>
        <label for="">Enter first player's name...</label>
        <input type="text" name="player1" placeholder="Player1 Name" required>

        <label for="">Enter second player's name...</label>
        <input type="text" name="player2" placeholder="Player2 Name" required>

        <input class="submit-btn" type="submit" name="submit-button" value="Start">
      </fieldset>
    </form>


  </section>

  <section class="game-screen">
    <div class="dice-Boxes">
      <div class="dice-Box-left dice-Box">
        <h3 class="H">Player 1</h3>
        <h4>0</h4>
        <img src="images/dice1.png" alt="dice-img">
      </div>

      <div class="dice-Box-right dice-Box">
        <h3 class="H">Player 2asdadads</h3>
        <h4>0</h4>
        <img src="images/dice1.png" alt="dice-img">
      </div>
    </div>
    <button class="roll-btn" type="button" name="roll-button">Roll</button>
  </section>

  <section class="footer">
    <p>aras Co. All Rights Reserved...</p>
  </section>


</body>

</html>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)