2016-09-17 68 views
0

有谁能告诉我为什么我的代码不会像上面的段落那样缩进?为什么我的段落不会像上面的段落那样缩进呢

我需要将“-Justin Reynolds”缩进上面的那一行。

<hr> 
 
<section> 
 

 
    <blockquote>I was struggling to lose weight after the birth of my second child. My friend recommended NewYou, and after the first three months I had lost 30 pounds. Thanks to the personal attention from their trainers and counselors, I've been able to keep the 
 
    weight off for two years. I'm in the best shape of my life!</blockquote> 
 

 
    <cite>&#8212;Justine Reynolds, Cleveland </cite> 
 

 
    <hr> 
 
    <h3>Call today to speak to one of our certified fitness specialists.</h3> 
 

 

 
</section>

回答

1

你可以把块引用内部<cite>,创造新线, <br>

<hr> 
 
<section> 
 

 
    <blockquote>I was struggling to lose weight after the birth of my second child. My friend recommended NewYou, and after the first three months I had lost 30 pounds. Thanks to the personal attention from their trainers and counselors, I've been able to keep the weight off for two years. I'm in the best shape of my life! 
 

 
    <br> 
 
    <br> 
 
    <cite>&#8212;Justine Reynolds, Cleveland </cite> 
 
    </blockquote> 
 

 

 

 
    <hr> 
 
    <h3>Call today to speak to one of our certified fitness specialists.</h3> 
 

 

 
</section>

或者使用CSS来移动<cite>留下来与块引用对齐

cite { 
 
    margin-left:40px; 
 
}
<hr> 
 
<section> 
 

 
    <blockquote>I was struggling to lose weight after the birth of my second child. My friend recommended NewYou, and after the first three months I had lost 30 pounds. Thanks to the personal attention from their trainers and counselors, I've been able to keep the weight off for two years. I'm in the best shape of my life! 
 
    </blockquote> 
 

 
    <cite>&#8212;Justine Reynolds, Cleveland </cite> 
 

 
    <hr> 
 
    <h3>Call today to speak to one of our certified fitness specialists.</h3> 
 

 

 
</section>

+1

第一个选项是面糊,然后第二个。好答案。 –

+0

啊,这是你怎么做到的!谢谢! –

1

放置Justine Reynolds....线块引用内部换行符后

<hr> 
 
<section> 
 

 
    <blockquote>I was struggling to lose weight after the birth of my second child. My friend recommended NewYou, and after the first three months I had lost 30 pounds. Thanks to the personal attention from their trainers and counselors, I've been able to keep the 
 
    weight off for two years. I'm in the best shape of my life! 
 
    <br> 
 
    <cite>&#8212;Justine Reynolds, Cleveland </cite> 
 

 
    </blockquote> 
 

 

 
    <hr> 
 
    <h3>Call today to speak to one of our certified fitness specialists.</h3> 
 

 

 
</section>