2017-04-19 59 views
3

我有p裏面div,這是不同於正常的段落。它始於右下方,有點像這個如何改變CSS的換行方向?

<p>

主要問題是,當我進入不同的方向更多的文本換行。

發生了什麼事。

enter image description here

我想要什麼。

enter image description here

這裏是我的樣式表:

div{ 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    } 

p{ 
    align-self: flex-end; 
} 

它甚至有可能?

回答

3

你想要這個嗎? See this fiddle

div{ 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    background: red; 
    width: 200px; 
    height: 200px; 
    } 

p{ 
    align-self: flex-end; 
    color: #fff; 
    text-align: right; 
}