HTML中的自动换行符

时间:2016-11-29 15:18:52

标签: html css

pic 1

好吧,所以我很想换线,但是线上还有足够的空间来容纳所有角色。我希望它在第三行是“2 Go”,但在我的HTML中,如果我在它之间放置一个空格,则强制换行。

这是我的代码:

HTML:

<div class="col-sm-3">
  <p class="lead wall-sticker">
    Shoe
    <br> Shine
    <br> 2 Go
    <br>
    <a href="#features">
      <button type="button" class="btn btn-primary btn-lg">Learn More</button>
    </a>
  </p>
</div>

CSS:

.wall-sticker {
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem 20rem 1rem 3rem;
  font-family: "FiveBoroughsHandwriting";
  font-size: 7rem;
  color: white;
}

我认为HTML不是CSS的问题。请参阅:https://jsfiddle.net/dwzc0fr7/

1 个答案:

答案 0 :(得分:0)

让我们尝试另一种解决方法

  • move_uploaded_file($_FILES["file"]["tmp_name"], $target_dir); //save data to disk $md5_of_data = md5_file ($target_dir); //get MD5 of saved data
  • 中移除填充:padding: 1rem 3rem 1rem 3rem;
  • .wall-sticker添加到text-align: center;
  • .wall-sticker更改为.col-sm-3&amp;同时添加.col-sm-4
  • .col-md-4更改为.col-sm-9&amp;同时添加.col-sm-8
  • 删除单词后的空格 - 例如.col-md-8Shoe<br>&amp; Shine<br>

Check Fiddle

enter image description here

enter image description here

enter image description here

enter image description here

相关问题