Make new line without using
in HTML

前端 未结 7 1354
时光取名叫无心
时光取名叫无心 2021-02-02 10:58

I want to make each one of these element is different line, without using
in HTML,

is block element but I have to fix its

相关标签:
7条回答
  • 2021-02-02 11:12

    Start by removing float: left from h1.

    Then add the rule:

    a.view-options {
        display: block;
    }
    
    0 讨论(0)
  • 2021-02-02 11:14

    This is the way that works for me.

    p.autonewline {white-space: pre-line;}
    
    0 讨论(0)
  • 2021-02-02 11:16

    Make the anchor tags block elements as well.

    0 讨论(0)
  • 2021-02-02 11:19

    Take float off the h1 tag and make a tags' display: display: block;

    0 讨论(0)
  • 2021-02-02 11:20

    Alternative way:

    Remove float:left; in h1 and display: inline-block; in a.view-options

    Then add

    h1:after, a:after {
        content:"\a";
        white-space: pre;
    }
    

    See http://jsfiddle.net/8my6q/

    0 讨论(0)
  • 2021-02-02 11:29

    Use CSS to make the anchor link tags blocks:

    a.view-options { display: block; }
    
    0 讨论(0)
提交回复
热议问题