很无聊的一个找碴游戏

作者:林小志 来源:林小志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
投稿

猜你喜欢

  • python抓取多种类型的页面方法实例

    2023-11-20 12:56:11
  • jupyter实现重新加载模块

    2023-12-16 20:46:45
  • Python Tornado框架轻松写一个Web应用的全过程

    2022-05-10 10:38:36
  • SQL Server 磁盘请求超时的833错误原因及解决方法

    2024-01-14 00:14:43
  • python爬虫开发之urllib模块详细使用方法与实例全解

    2021-02-24 04:52:42
  • 详解PHP中的mb_detect_encoding函数使用方法

    2023-11-14 19:48:45
  • Python自动发送邮件的方法实例总结

    2023-05-21 02:53:42
  • HTTP中header头部信息详解

    2023-06-11 23:33:17
  • Python语言中的数据类型-序列

    2023-08-31 14:36:24
  • 把JSON数据格式转换为Python的类对象方法详解(两种方法)

    2022-09-08 03:13:05
  • 如何go语言比较两个对象是否深度相同

    2024-02-18 21:21:58
  • 教你使用pyinstaller打包Python教程

    2021-01-20 01:07:28
  • 教你用FrontPage2003轻松布局网页

    2008-02-24 17:05:00
  • Python中的defaultdict模块和namedtuple模块的简单入门指南

    2022-01-21 07:10:20
  • 基于Python实现微博抓取GUI程序

    2021-06-01 10:59:29
  • Python Pillow Image Invert

    2023-10-02 12:33:30
  • python利用K-Means算法实现对数据的聚类案例详解

    2021-02-28 10:01:29
  • Python Django项目和应用的创建详解

    2023-12-26 15:03:52
  • SQLServer导出数据到MySQL实例介绍

    2024-01-13 08:07:17
  • Python3使用turtle绘制超立方体图形示例

    2021-02-01 14:21:07
  • asp之家 网络编程 m.aspxhome.com