国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 临泽县| 石家庄市| 盘锦市| 高雄县| 东平县| 怀安县| 阿拉善右旗| 连州市| 新宁县| 拜泉县| 通化市| 佛学| 宜宾县| 鹤峰县| 台南县| 浑源县| 肇东市| 阜南县| 南皮县| 含山县| 灵璧县| 新巴尔虎右旗| 华坪县| 扎赉特旗| 安顺市| 桃园市| 达孜县| 视频| 酒泉市| 思南县| 郯城县| 金门县| 隆尧县| 湄潭县| 金秀| 买车| 宣威市| 綦江县| 万山特区| 大宁县| 灌云县|