<style type="text/css"> .ellipsis { white-space: nowrap; /*保留文字間的空白*/ width: 200px; overflow: hidden; /*超出部分隱藏,*/ text-overflow: ellipsis; /*超出部分顯示成... */ border:1px solid #333; } </style> <div class="ellipsis"> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx </div>