How to change a span to look like a pre with CSS?

后端 未结 8 1690
你的背包
你的背包 2020-12-01 04:05

Is it possible to to change a tag (or

) to preformat its contents like a
 tag would using only CSS?         


        
相关标签:
8条回答
  • 2020-12-01 04:48

    Try this

    span {
        white-space: pre;
        font-family: monospace;
        display: block;
        unicode-bidi: embed
    }
    
    0 讨论(0)
  • 2020-12-01 04:48

    Try this style

    .pre {
    
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;   
    word-break: break-all;
    white-space: pre;
    white-space: pre\9; /* IE7+ */
    display: block;
    }
    

    Used the same here - http://www.makemyshop.in/

    0 讨论(0)
提交回复
热议问题