Creating fancy letterheaded paper

2018-05-15 17:26 更新
先決條件: 在嘗試此評估之前,您應(yīng)該已經(jīng)完成了本單元中的所有文章。
目的: 測試CSS盒子模型的理解,以及其他盒子相關(guān)的功能,如實(shí)現(xiàn)背景。

初始點(diǎn)

要開始評估,您應(yīng)該:

  • Make local copies of the HTML and CSS — save them as index.html and style.css in a new directory.
  • Save local copies of the top, bottom and logo images in the same directory as your code files.

注意:或者,您也可以使用 JSBin "https://thimble.mozilla.org/"class ="external-icon external"> Thimble 來做你的評估。 您可以粘貼HTML并將CSS填入其中一個在線編輯器。 如果您使用的在線編輯器沒有單獨(dú)的CSS面板,請隨意將其放在文檔頭部的< style> 元素中。

工程概要

您已經(jīng)獲得了創(chuàng)建信件朝向的紙模板所需的文件。 你只需要把文件放在一起。 要到達(dá)那里,您需要:

主信

  • Apply the CSS to the HTML.
  • Add a background declaration to the letter that:
    • Fixes the top image to the top of the letter
    • Fixes the the bottom image to the bottom of the letter
    • Adds a semi-transparent gradient over the top of both of the previous backgrounds that gives the letter a bit of texture. Make it slightly dark right near the top and bottom, but completely transparent for a large part of the center.
  • Add another background declaration that just adds the top image to the top of the letter, as a fallback for browsers that don't support the previous declaration.
  • Add a white background color to the letter.
  • Add a 1mm top and bottom solid border to the letter, in a color that is inkeeping with the rest of the color scheme.
  • To the <h1>, add the logo as a background image.
  • Add a filter to the logo to give it a subtle drop shadow.
  • Now comment out the filter and implement the drop shadow in a different (slightly more cross-browser compatible) way, which still follows the shape of the round image.

提示和提示

  • Remember that you can create a fallback for older browsers by putting the fallback version of a declaration first, followed by the version that works across newer browsers only. Older browsers will apply the first declaration and ignore the second one, whereas newer browsers will apply the first one, then override it with the second one.
  • Feel free to create your own graphics for the assessment if you wish.

例子

以下屏幕截圖顯示了完成的設(shè)計(jì)可以是什么樣子的示例:

;">

評定

如果您作為有組織課程的一部分參加此評估,您應(yīng)該能夠?qū)⒛墓ぷ鹘唤o您的老師/導(dǎo)師進(jìn)行標(biāo)記。 如果您是自學(xué)習(xí)的,那么您可以輕松地通過 dev-mdc 郵件列表,或者在 #mdn IRC頻道中。 org / IRC"class ="external"> Mozilla IRC 。 嘗試練習(xí)第一 - 沒有什么可以通過作弊獲得!

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號