您现在的位置: 丁丁家园 >> 网上学院 >> web语言开发 >> XML与CSS >> 文章正文
CN域名1元/年 | 高清晰图库
    

[图文]web标准布局实例教程

        ★★★
【字体:
·好听的歌 ·火影忍者 ·价值投资=8年资产增值8倍 ·伤感歌曲 ·火影忍者漫画 ·QQ空间代码 ·天天基金网 ·经典老歌
web标准布局实例教程
作者:蓝色理想    文章来源:蓝色理想    点击数:    更新时间:2006-8-29

呵呵,其实也很简单?大家知道背景图象中有:图像横纵坐标位置设置,此例子也正是运用这个特性,将拥有不同ID的链接A的背景进行偏移,以达到背景切换的目的。*/

<a href="#" id="page" title="page"></a>

<a href="#" id="about" title="about"></a>

<a href="#" id="services" title="services"></a>

<a href="#" id="contacts" title="contacts"></a>

</div>

<h1></h1>

<h2></h2>

<h6></h6>

</div>

</BODY>

</HTML>

实际页面效果:

<HTML>

<HEAD>

<TITLE>model</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">

<style>

html,body{

margin:0;

padding:0;

background:#A1A9B6 url(/articleimg/2006/07/3738/allbg.jpg);

text-align:center;

}

#main{

margin:0 auto;

position:relative;

width:780px;

height:659px;

background:url(/articleimg/2006/07/3738/model.jpg) no-repeat;

}

#main #menu{

position:absolute;

right:12px;

width:354px;

height:115px;

background:url(/articleimg/2006/07/3738/menu.gif) no-repeat;

}

#main #menu a#page,#main #menu a#about,#main #menu a#services,#main #menu a#contacts{

float:left;

width:112px;

height:30px;

}

#main #menu a#about{

width:80px;

height:55px;

}

#main #menu a#services{

width:70px;

height:80px;

}

#main #menu a#contacts{

width:80px;

height:115px;

}

#main #menu a:hover{

background: url(/articleimg/2006/07/3738/menu.gif) no-repeat;

}

#main #menu a#page:hover{

background-position: 0px -115px;

}

#main #menu a#about:hover{

background-position: -112px -115px;

}

#main #menu a#services:hover{

background-position: -192px -115px;

}

#main #menu a#contacts:hover{

background-position: -262px -115px;

}

#main h1{

position:absolute;

top:0;left:1px;

width:151px;

height:56px;

background:url(/articleimg/2006/07/3738/logo.jpg) no-repeat;

}

#main h2{

position:absolute;

top:133px;

right:7px;

width:404px;

height:190px;

background:url(/articleimg/2006/07/3738/about.gif) no-repeat;

}

#main h6{

position:absolute;

bottom:75px;

right:10px;

width:265px;

height:44px;

background:url(/articleimg/2006/07/3738/cars-logo.gif) no-repeat;

}

</style>

</HEAD>

<BODY>

<div id="main">

<div id="menu">

<a href="#" id="page" title="page"></a>

<a href="#" id="about" title="about"></a>

<a href="#" id="services" title="services"></a>

<a href="#" id="contacts" title="contacts"></a>

</div>

<h1></h1>

<h2></h2>

<h6></h6>

</div>

</BODY>

</HTML>

好了,这次的实例教程就结束了,希望对大家以后进行xhtml网页的设计,布局能有所帮助!

上一页  [1] [2] 

【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口推荐赚点

网友评论

【发表评论】
(评论内容只代表网友观点,与本站立场无关!)
相关文章
没有相关文章

本频道栏目分类导航