国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > CSS > 正文

css 背景圖片定位在菜單效果中的應(yīng)用實例

2024-07-11 08:46:02
字體:
供稿:網(wǎng)友
這款菜單大家需要注意HOVER狀態(tài)下背景圖片定位發(fā)生了變化,從而實現(xiàn)了這樣的效果。

本實例是一位國外的朋友所寫,不進行任何翻譯,直接發(fā)出來,大家可以償試閱讀,如果遇到困難可以求助于翻譯軟件。
不斷的提高自己的英文閱讀能力也是我們一直所提倡的,讓我們一起努力吧!

Overview
  Here are the required graphics to assembe the menu


1. Main background
  Open the Photoshop file. Turn off the menu text Layer Group and save the main background as menu-bg.jpg.


2. Button graphics
  Turn off the background Layer Group and leave only the menu text layers visible. Make a rectangle selection cover the "home" item, go to menu Edit > Copy Merged (Cmd + Shift + C).


  Create a new file and take note of the file dimension (w x h), in my case the "home" graphic is 144 x 58px. Paste the "home" graphic in the new file. Go to menu Image > Canvas Size, adjust the image height x 2 (58 + 58 = 116px). Duplicate the home graphic layer and align it to the bottom. Erase the highlight strokes in the upper layer.


  Here is how the hover effect will work. We will set the link button to 144 x 58px, when mouseover, we will shift the background image from top to bottom.


  Repeat this step for the other buttons. You should have the follow graphics:


3. HTML source
  When you are done with the graphics, let’s start coding. Start with an un-ordered list <ul>.
  ● note there is an id="menu" assigned to the<ul> tag
  ● an unique class name assigned to each link <a>
  ● an empty <span> tag (the purpose of this is to make the mouseover effect)

div css xhtml xml Example Source Code Example Source Code [www.52css.com]
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 定陶县| 鞍山市| 神木县| 海林市| 张家川| 东明县| 广水市| 徐闻县| 惠水县| 萝北县| 峨眉山市| 西宁市| 葫芦岛市| 武城县| 五大连池市| 南召县| 屏山县| 琼海市| 溧水县| 苍南县| 桃园市| 昌邑市| 沽源县| 靖安县| 杂多县| 柏乡县| 闻喜县| 松溪县| 张家界市| 尼勒克县| 陈巴尔虎旗| 象州县| 怀宁县| 紫云| 尼玛县| 文登市| 双牌县| 玉溪市| 民丰县| 朝阳区| 瓦房店市|