簡體   English   中英

帶Bootstrap的HTML新行

[英]HTML New Line with Bootstrap

使用此參考和紅色警報選項。 這里是:

<div class="alert alert-dismissible alert-danger">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    <strong>Oh snap!</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again.
</div>

在他們的示例中, 嘗試 ..之后會有換行符,這僅僅是因為寬度嗎?

我的版本:

<div class="alert alert-dismissable alert-danger" style="float:right;">
    <button type="button" class="close" data-dissmiss="alert">&times;</button>
    <strong>Leave blank if there is already a Record for today!&#13;&#10; This will auto-calculate based on the previous Record.</strong>
</div>

現在我的行​​沒有換行符,但是我也沒有弄亂CSS ..但我想知道是否有辦法在<strong>內聯行中插入換行符? 我嘗試使用此方法 ,但我猜想嚴格來說是<textarea>的。

任何幫助表示贊賞。

只要在想要換行的地方放一個br標簽即可。 由於插入了<br> ,因此請注意以下示例中記錄后的新行。

 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <div class="alert alert-dismissable alert-danger" style="float:right;"> <button type="button" class="close" data-dissmiss="alert">&times;</button> <strong>Leave blank if there is already a Record<br>for today!&#13;&#10; This will auto-calculate based on the previous Record.</strong> </div> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM