很无聊的一个找碴游戏

作者:林小志 来源:林小志blog 时间:2008-07-02 13:10:00 

 家里没网络,实在无聊,玩游戏都没味道,只好玩CSS。

这个东西实在没什么技术含量在里面,纯属打发时间。

简单说明:一张图片放在底层,上面覆盖一个操作范围区域的层,然后再叠加5个a的位置,这样基本的就完成了。如果会JS的话,可以做得更完美,可惜不会。努力学习!

CSS内容:


* {margin:0;padding:0;}
body {background:#000000;}
.wrapper {width:828px;height:502px;margin:10px auto;padding:5px;border:1px solid #999999;background:url(pic.jpg) 5px 5px no-repeat;}
.opArea {float:right;width:407px;height:502px;position:relative;cursor:pointer;z-index:99;}
a {width:50px;height:50px;display:block;position:absolute;}
    .d1 {top:147px;left:51px;}
    .d2 {top:150px;right:121px;}
    .d3 {width:100px;height:40px;right:90px;bottom:156px;}
    .d4 {width:110px;top:53px;right:25px;}
    .d5 {right:55px;bottom:227px;}
.fRight {background:url(right.gif) center center no-repeat;}

XHTML内容:


<div class="wrapper">
    <div class="opArea">
        <map id="fd">
            <a href="##" class="d1" onclick="this.className='fRight d1'"></a>
            <a href="##" class="d2" onclick="this.className='fRight d2'"></a>
            <a href="##" class="d3" onclick="this.className='fRight d3'"></a>
            <a href="##" class="d4" onclick="this.className='fRight d4'"></a>
            <a href="##" class="d5" onclick="this.className='fRight d5'"></a>
        </map>
    </div>
</div>


标签:游戏,css,找碴
0
投稿

猜你喜欢

  • 清除浮动的最简写法

    2009-03-30 15:58:00
  • 数字人组件反写[asp组件开发实例2]

    2009-06-09 13:15:00
  • 关注前端开发流程

    2009-12-31 17:38:00
  • 全面了解CSS内置颜色(color)值

    2008-11-19 12:26:00
  • 费茨法则在交互设计中的应用

    2009-07-09 19:02:00
  • SQL SQL Server 2008中的新日期数据类型

    2009-03-10 15:01:00
  • IA学习笔记04:标签系统

    2009-09-22 14:40:00
  • asp加载access数据库并生成XML文件范例

    2008-07-22 12:41:00
  • asp如何让页面背景五彩缤纷?

    2010-05-13 16:38:00
  • oracle中的视图详解

    2009-12-22 11:48:00
  • SQL Server 2008中有关XML的新功能

    2008-06-04 12:57:00
  • mysql表的性能提升的相关问题

    2010-03-03 16:31:00
  • 文字适度阅读的宽度或者字数

    2007-10-26 07:31:00
  • 通过作业调度建立SQL Server的自动备份

    2008-12-09 14:58:00
  • 特别推荐:Web开发常用速查手册大全(100+)

    2011-05-06 12:44:00
  • 表格可读性提升分析

    2010-05-19 13:03:00
  • 301转向代码合集

    2008-03-20 10:12:00
  • ASP编程入门进阶(十一):Chat聊天程序

    2008-05-12 07:06:00
  • mssql 大小写区分方法

    2008-12-29 14:08:00
  • 创意方法杂谈

    2009-05-13 12:53:00
  • asp之家 网络编程 m.aspxhome.com