Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Primero, hay que identificar el trozo de code correspondiente a la penúltima página:
- <input type="checkbox" id="iiM98"><label class="bpM98" for="iiM98">09</label><span><i><div class="pagM98">Pág. 017
- </div><div class="pagM98">Pág. 018
- </div></i></span>
- Y la última página:
- <input type="checkbox" id="jjM98"><label class="bpM98" for="jjM98">10</label><span><i><div class="pagM98">Pág. 019
- </div><div class="pagM98">Pág. 020
- </div><a href="https://emmescodes.tumblr.com/" title="Code by Emme" class="miM98">Emme</a></i></span>
- Atención a las IDs. Los numeré con letras. La primer página es "aaM98", la siguiente "bbM98", la tercera "ccM98", etc. Y lo mismo con los for.
- Para asegurarse de no repetir IDs, hay que seguir el orden (o inventarse uno nuevo, funcionará siempre que el ID y el for de cada página sean iguales entre si y diferentes del resto).
- La parte a duplicar para agregar páginas es esta:
- <input type="checkbox" id="iiM98"><label class="bpM98" for="iiM98">09</label><span><i><div class="pagM98">Pág. 017
- </div><div class="pagM98">Pág. 018
- </div></i></span>
- Cambiamos IDs y Fors:
- <input type="checkbox" id="kkM98"><label class="kkM98" for="iiM98">09</label><span><i><div class="pagM98">Contenido aquí
- </div><div class="pagM98">Contenido Aquí
- </div></i></span>
- Y lo pegamos antes de la última página.
- Estamos a la mitad.
- Ahora hay que ir a https://codepen.io/, crear un nuevo pen y pegar el contenido de https://cdn.statically.io/gh/EmmesCodes/CSS/e0448298/M98.css en la zona de CSS. También se puede pegar en el CSS del foro si se tiene uno o en cualquier otro host.
- Hay que editar el CSS. La parte que nos interesa es la siguiente:
- .bpM98:nth-of-type(2),
- .conM98 > span:nth-of-type(1) {
- z-index: 20;
- }
- .bpM98:nth-of-type(3),
- .conM98 > span:nth-of-type(2) {
- z-index: 18;
- }
- .bpM98:nth-of-type(4),
- .conM98 > span:nth-of-type(3) {
- z-index: 16;
- }
- .bpM98:nth-of-type(5),
- .conM98 > span:nth-of-type(4) {
- z-index: 14;
- }
- .bpM98:nth-of-type(6),
- .conM98 > span:nth-of-type(5) {
- z-index: 12;
- }
- .bpM98:nth-of-type(7),
- .conM98 > span:nth-of-type(6) {
- z-index: 10;
- }
- .bpM98:nth-of-type(8),
- .conM98 > span:nth-of-type(7) {
- z-index: 8;
- }
- .bpM98:nth-of-type(9),
- .conM98 > span:nth-of-type(8) {
- z-index: 6;
- }
- .bpM98:nth-of-type(10),
- .conM98 > span:nth-of-type(9) {
- z-index: 4;
- }
- .bpM98:nth-of-type(11),
- .conM98 > span:nth-of-type(10) {
- z-index: 2;
- }
- Esto define el orden de las páginas y los botones. La parte que hay que multiplicar por cada página agregada es:
- .bpM98:nth-of-type(11),
- .conM98 > span:nth-of-type(10) {
- z-index: 2;
- }
- Y, muy importante, editar los números necesarios para preservar la secuencia. Los primeros dos ( nth-of-type(11) y span:nth-of-type(10) ) bastará con sumarle una unidad. El último ( z-index: 2; ) hay que trabajar sobre el conjunto y modificarlos todos de tal manera que las últimas páginas tengan el valor más bajo.
- Con solo una página más, quedaría:
- .bpM98:nth-of-type(2),
- .conM98 > span:nth-of-type(1) {
- z-index: 22;
- }
- .bpM98:nth-of-type(3),
- .conM98 > span:nth-of-type(2) {
- z-index: 20;
- }
- .bpM98:nth-of-type(4),
- .conM98 > span:nth-of-type(3) {
- z-index: 18;
- }
- .bpM98:nth-of-type(5),
- .conM98 > span:nth-of-type(4) {
- z-index: 16;
- }
- .bpM98:nth-of-type(6),
- .conM98 > span:nth-of-type(5) {
- z-index: 14;
- }
- .bpM98:nth-of-type(7),
- .conM98 > span:nth-of-type(6) {
- z-index: 12;
- }
- .bpM98:nth-of-type(8),
- .conM98 > span:nth-of-type(7) {
- z-index: 10;
- }
- .bpM98:nth-of-type(9),
- .conM98 > span:nth-of-type(8) {
- z-index: 8;
- }
- .bpM98:nth-of-type(10),
- .conM98 > span:nth-of-type(9) {
- z-index: 6;
- }
- .bpM98:nth-of-type(11),
- .conM98 > span:nth-of-type(10) {
- z-index: 4;
- }
- .bpM98:nth-of-type(12),
- .conM98 > span:nth-of-type(11) {
- z-index: 2;
- }
- Con dos páginas más:
- .bpM98:nth-of-type(2),
- .conM98 > span:nth-of-type(1) {
- z-index: 24;
- }
- .bpM98:nth-of-type(3),
- .conM98 > span:nth-of-type(2) {
- z-index: 22;
- }
- .bpM98:nth-of-type(4),
- .conM98 > span:nth-of-type(3) {
- z-index: 10;
- }
- .bpM98:nth-of-type(5),
- .conM98 > span:nth-of-type(4) {
- z-index: 18;
- }
- .bpM98:nth-of-type(6),
- .conM98 > span:nth-of-type(5) {
- z-index: 16;
- }
- .bpM98:nth-of-type(7),
- .conM98 > span:nth-of-type(6) {
- z-index: 14;
- }
- .bpM98:nth-of-type(8),
- .conM98 > span:nth-of-type(7) {
- z-index: 12;
- }
- .bpM98:nth-of-type(9),
- .conM98 > span:nth-of-type(8) {
- z-index: 10;
- }
- .bpM98:nth-of-type(10),
- .conM98 > span:nth-of-type(9) {
- z-index: 8;
- }
- .bpM98:nth-of-type(11),
- .conM98 > span:nth-of-type(10) {
- z-index: 6;
- }
- .bpM98:nth-of-type(12),
- .conM98 > span:nth-of-type(11) {
- z-index: 4;
- }
- .bpM98:nth-of-type(13),
- .conM98 > span:nth-of-type(12) {
- z-index: 2;
- }
- Ahora queda guardar el pen o salvar los cambios en css del foro. Si se optó por usar codepen, hay que copiar el enlace del pen (algo como "https://codepen.io/Nombre/pen/MWWVExq") y usarlos como reemplazo de mi enlace (https://cdn.statically.io/gh/EmmesCodes/CSS/e0448298/M98.css), agregandole .css al final.
- Quedaría algo así:
- <link href="https://codepen.io/Nombre/pen/MWWVExq.css" rel="stylesheet">
Add Comment
Please, Sign In to add comment