我有以下内容:
div.div
p.paragraph
| about 3 lines of text... (dynamic)
button.button-i-want-to-center
| click_me
我希望它看起来像这样:
___________________________
| Text.....................|
| Text.....................|
| Text.....................|
| ______ |
| |BUTTON| | <--- Center of div:
| | I want the button to ignore
| | the text.
| |
| |
___________________________
记住 div 的大小是动态的。
我该如何实现呢?我尝试了 flex,但没有成功。固定的边距也不行。
display:inline-block;
:显示:行内块状;
margin:auto
:边距:自动;