<sectionid="description"> Normalmente, los elementos de los <code>button</code> con las clases <code>btn</code> y <code>btn-default</code> son solo tan anchos como el texto que contienen. Por ejemplo: <code><button class="btn btn-default">Submit</button></code> Este botón solo será tan ancho como la palabra "Enviar". <buttonclass="btn btn-default">Enviar</button> Haciéndolos elementos de bloque con la clase adicional de <code>btn-block</code> , 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. <code><button class="btn btn-default btn-block">Submit</button></code> Este botón ocuparía el 100% del ancho disponible. <buttonclass="btn btn-default btn-block">Enviar</button> Tenga en cuenta que estos botones todavía necesitan la clase <code>btn</code> . Agregue la clase <code>btn-block</code> de Bootstrap a su botón Bootstrap. </section>
- text: Su botón aún debe tener las clases <code>btn</code> y <code>btn-default</code> .
testString: 'assert($("button").hasClass("btn") && $("button").hasClass("btn-default"), "Your button should still have the <code>btn</code> and <code>btn-default</code> classes.");'
- text: Tu botón debe tener la clase <code>btn-block</code> .
testString: 'assert($("button").hasClass("btn-block"), "Your button should have the class <code>btn-block</code>.");'
- text: Asegúrese de que todos los elementos de sus <code>button</code> tengan una etiqueta de cierre.
testString: 'assert(code.match(/<\/button>/g) && code.match(/<button/g)&&code.match(/<\/button>/g).length === code.match(/<button/g).length,"Makesureallyour<code>button</code> elements have a closing tag.");'