using css to duplicate html elements

前端 未结 11 791
遥遥无期
遥遥无期 2020-12-16 13:32

I\'ve been handing a design for a webpage which I\'m trying to implement correctly. This design contains navigation elements which are partially or entirely duplicated all

11条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 14:11

    You could duplicate it by projecting content from an attribute as pseudo elements:

    .duplicate::before {
        content:attr(title);
        display:block;
    }
    .duplicate::after {
        content:attr(title);
        display:block;
    }

提交回复
热议问题