button
con las clases btn
y btn-default
son solo tan anchos como el texto que contienen. Por ejemplo: <button class="btn btn-default">Submit</button>
Este botón solo será tan ancho como la palabra "Enviar". Haciéndolos elementos de bloque con la clase adicional de btn-block
, su botón se estirará para llenar todo el espacio horizontal de su página y cualquier elemento que lo siga fluirá hacia una "nueva línea" debajo del bloque. <button class="btn btn-default btn-block">Submit</button>
Este botón ocuparía el 100% del ancho disponible. Tenga en cuenta que estos botones todavía necesitan la clase btn
. Agregue la clase btn-block
de Bootstrap a su botón Bootstrap. btn
y btn-default
.
testString: 'assert($("button").hasClass("btn") && $("button").hasClass("btn-default"), "Your button should still have the btn
and btn-default
classes.");'
- text: Tu botón debe tener la clase btn-block
.
testString: 'assert($("button").hasClass("btn-block"), "Your button should have the class btn-block
.");'
- text: Asegúrese de que todos los elementos de sus button
tengan una etiqueta de cierre.
testString: 'assert(code.match(/<\/button>/g) && code.match(/Click here for cat photos.
Things cats love:
Top 3 things cats hate: