jquery - llaves - como poner corchetes en laptop acer
¿Cómo agregar corchetes(a) a la lista ordenada? compatible en todos los navegadores (8)
Tengo que mostrar como
(una)
(segundo)
(do)
Actualizar:
Encontré una forma CSS
ol {list-style-type: none;}
li:before {content: "(" counter(section, lower-alpha) ") ";}
li { counter-increment: section;}
pero no funciona en IE 7 e inferior.
Desde CSS3 el problema parece solucionado:
style="list-style-type: parenthesized-lower-latin;"
En lugar de eso hice párrafos. Yo sangré el párrafo y luego saqué la primera línea, usando una sangría de texto y los numeré yo mismo.
.list_indent {
margin-left:48px;
}
.list_indent p {
text-indent:-26px;
}
<div class="list_indent">
<p> (1) The recruitment report and a copy of the blah and blah and blah and blah and blah and blah and blah and blah.;
</p>
<p> (2) A copy of the blah and blah and blah and blah and blah and blah and blah and blah.
</p>
<p> (3) Recruitment.
</p>
</div>
Esto es posible con contadores personalizados, pero al menos IE7 no lo admite, algunos otros tampoco. Consulte aquí para obtener más información: http://www.quirksmode.org/css/counter.html
Ex:
li:before {
content: "(" counter(mycounter,lower-latin) ")";
}
No hay una forma integrada de hacer esto. Lo que significa que entras en la tierra de (diversión) hacks.
Podrías probar una imagen de fondo de dos paréntesis.
No se puede obtener (a) (b) (c).
Sin embargo, puede obtener la carta sin los corchetes:
<ul style="list-style-type: lower-latin;">...</ul>
Consulte http://www.w3schools.com/CSS/tryit.asp?filename=trycss_list-style-type_all
O simplemente puede agregar el recuento de texto manualmente sin tener que preocuparse por los fallbacks del navegador. Funciona en cualquier navegador!
ul.abc-list {
list-style: none;
padding-left: 30px;
}
ul.abc-list > li > span.counter {
position: absolute;
margin-left: -20px;
/*if you want to right align the text
*
* width: 15px;
* text-align: right;
*/
}
<ul class="abc-list">
<li><span class="counter">a)</span> One</li>
<li><span class="counter">b)</span> Two</li>
<li><span class="counter">c)</span> Three</li>
<li><span class="counter">d)</span> Four</li>
<li><span class="counter">e)</span> Five</li>
<ul>
Yo uso este fragmento de código en mediawiki con CSS habilitado. No estoy seguro de si esto funcionará en versiones anteriores de IE ...
{{#css:
.laparent ol { counter-reset: item }
.laparent li { display: block ; counter-increment: item; }
.laparent li:before { content: " ("counter(item,lower-alpha)") "; }
}}
<ol class=laparent>
<li> this is the first item;
<li> this is the second item; or
<li> this is the third item.
</ol>
Salidas:
(a) this is the first item;
(b) this is the second item; or
(c) this is the third item.
Estas son tus opciones según W3C.
Con CSS no es posible. Tendría que hacer una lista personalizada usando javascript (o similar).