0
我試圖使文本適合容器的一行,即使標題太長。如何自動將文本放入框中即使標題太長
<div id="container" style="
width:360px;
margin:0 auto;
background:#f7f7f7;
box-shadow:0 0 3px rgba(0,0,0, 0.1)">
<h5 style="
background:#2980b9;
color:white;
margin:0
padding:10px 20px;">popular</h5>
<ul style="
list-style:none;
margin:0;
padding:0;">
{% for x in topStory %}
<a href='{{ x.get_absolute_url }}'><li class="unique">{{x.title}}</li></a>
{% endfor %}
</ul>
</div>
有沒有辦法做到這一點?或者每次我製作標題時都必須小心。