2014-03-13 24 views
2

我目前使用reveal.js黑客入侵了一些幻燈片並想知道如何防止標題中的文字換行符?也許我只是錯過了文檔的一部分,但沒有任何線索。如何防止標題中的reveal.js換行符

因此,例如,有<h1>Some reallongword</h1><h1>Some reall \n ongword</h1>

更新結束了:我已經添加了手動<br>到標題等不能確定它是否是最好的解決辦法,但似乎至少工作。

回答

1

遲了一個月,但發佈供參考。

/css/reveal.css有這樣的地方,在線路70

.reveal h1, 
.reveal h2, 
.reveal h3, 
.reveal h4, 
.reveal h5, 
.reveal h6 { 
    -webkit-hyphens: auto; 
     -moz-hyphens: auto; 
      hyphens: auto; 

    word-wrap: break-word; 
    line-height: 1; 
} 

您可以更改到

-webkit-hyphens: manual; 
    -moz-hyphens: manual; 
     hyphens: manual; 

word-wrap: normal; 

或index.html中嵌入自身的變化。

<style type="text/css"> 
     .reveal h1, 
     .reveal h2, 
     .reveal h3, 
     .reveal h4, 
     .reveal h5, 
     .reveal h6 { 
      word-wrap: normal; 
      -webkit-hyphens: manual; 
      -moz-hyphens: manual; 
      hyphens: manual; 
     } 
    </style> 

測試Firefox和Chromium。不知道它是否可以在自定義主題中工作。

編輯:whoops,typo。

+0

它工作在一個自定義的主題,它是有意義的做編輯那裏(或在演示文稿的