用CSS製作偽標籤雲

來源:互聯網
上載者:User

標籤:

  • performance testing
  • stress testing
  • conformance testing
  • acceptane testing
  • smoke testing
  • regression testing
  • white box testing
  • system testing
  • black box testing
  • load testing
  • compatibility testing
  • unit testing

 

這就是我們要製作的標籤雲效果。

 

HTML代碼

<ul class="cloud">    <li>performance testing</li>    <li>stress testing</li>    <li>conformance testing</li>    <li>acceptane testing</li>    <li>smoke testing</li>    ...</ul>

 

CSS代碼

/* 清除ul預設樣式 */
.cloud { display: inline; list-style-type: none; width: 400px;}.cloud li { list-style: none; display: inline;}/* 清除ul預設樣式 */
.cloud li:nth-of-type(3n + 1) { font-size: 1.25em;}.cloud li:nth-of-type(4n+3) { font-size: 1.5em;}.cloud li:nth-of-type(5n - 3) { font-size: 1em;}

 

這個標籤雲效果並不是隨機的,是用:nth-of-type這個CSS屬性控制的,所以你重新整理頁面看到的效果跟這次一樣。

 

不過有什麼關係呢,有標籤雲效果。你可以根據自己的需要對代碼更改。

 

參考連結:Tag cloud of random sizes in pure CSS

 

(完)

用CSS製作偽標籤雲

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.