[英]HTML with Bootstrap: button right aligned and a div centered in a new line
[英]HTML New Line with Bootstrap
使用此參考和紅色警報選項。 這里是:
<div class="alert alert-dismissible alert-danger">
<button type="button" class="close" data-dismiss="alert">×</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">×</button>
<strong>Leave blank if there is already a Record for today! 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">×</button> <strong>Leave blank if there is already a Record<br>for today! This will auto-calculate based on the previous Record.</strong> </div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.