Подтвердить что ты не робот

Можно ли оправдывать текст в рамках бутстрапа?

Это может быть глупый вопрос, но я уверен, что я не единственный, кто задается вопросом.

Я знаю классы выравнивания: <p class="text-center">Text Centered within the block element</p> <p class="text-right">Text aligned to the right within the block element</p> <p class="text-left">Text aligned to the left within the block element</p>

Есть ли набор классов в Twitters Bootstrap Framework, который оправдывает текст?

например. <p class="text-justify">Sample Text Goes Here</p>

почему появляется, что bootstrap не включает функцию полезности, такую ​​как text-align: justify?

4b9b3361

Ответ 1

Нет. Но вы можете добавить новый класс в bootstrap.css

.text-justify {
  text-align: justify;
}

Обновление

Предыдущие версии bootstrap не поддерживали text-justify. Но bootstrap 3 добавил класс text-justify.

Ответ 2

В Bootstrap 3 вы можете использовать это:

<p class="text-justify">Justified text.</p>

Ответ 3

Вы можете добавить к своему файлу main.css, custom.css или независимо от того, какой файл *.css вы сделали, или вверху файла bootstrap.css:

.text-justify {
  text-align: justify;
}

Если вы добавите это в файл bootstrap.css, начиная с версии 3.0.0, это будет выглядеть следующим образом:

/*!
 * Bootstrap v3.0.0
 *
 * Copyright 2013 Twitter, Inc
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Designed and built with all the love in the world by @mdo and @fat.
 */

/*! normalize.css v2.1.0 | MIT License | git.io/normalize */

article,
aside,
details,
...
...
…

к

/*!
 * Bootstrap v3.0.0
 *
 * Copyright 2013 Twitter, Inc
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Designed and built with all the love in the world by @mdo and @fat.
 */

/*! normalize.css v2.1.0 | MIT License | git.io/normalize */

.text-justify {
  text-align: justify;
}

article,
aside,
details,
...
...
…