首页 > 解决方案 > 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 information...</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>

标签: whitespacenowraph3

解决方案


推荐阅读