2016-10-05 24 views
-1

我正在學習引導程序(順便說一句,它是令人驚歎!),我有一個問題。我有一個「H3」的標籤,像這樣......Bootstrap在一行上着色多個單詞?

<h3 class="pull-right">CALL 555-123-4567</h3> 

我想要做的樣式這個標籤是什麼使「呼」的第一部彩色,和電話號碼的另一種顏色。

我知道如何用CSS來做,但bootstrap與此有什麼關係?我是否需要爲電話號碼中的「通話」單詞創建另一個班級?

例如, 。 。

<h3 class="pull-right"><h3 class="#">CALL</h3><h3 class="#">555-123-456</h3> 

或者它會更像這樣的ID嗎?

<div id="container"> <!--pull this right with bootstrap? would that even work? would the name need to be 'pull-right' and not container?--> 
    <h3 class="colorChange"> CALL <h3> <h3 class="newColorChange" 555-123-4567</h3> 
</div> 

哪個更合適?使用引導框架改變文本顏色的原始問題是我最關心的問題。

回答

1

您絕對不應該在h3標籤內嵌套h3。風格電話電話號碼。分開,所有你需要的是:

<h3 class="pull-right"> 
    <span class="call">CALL</span> 
    <span class="number">555-123-4567</span> 
    </h3> 

現在可以風格CALL分開。

+0

謝謝,我很少使用span標籤。這工作完美。 –