有一张图片,它是由很多个小图片组合成的。
    现在想使用图片上的小图片做为各个按钮的背景图,
    应该怎么截取图片了
    希望可以兼容各个浏览器。
    我想找一个文本编辑工具,用作写博客用的那种,谁可以推荐一下。    大家帮帮忙,出出主意javascript文本编辑背景图片背景切割

解决方案 »

  1.   

    第一个问题 使用css的background属性的background-position参数来定位各个图片.将图片集中在一张图片上的好处是这些按钮只用请求一次图片即可到处使用,对提高网页载入速度有利.文本编辑工具推荐fckeditor  之前其他朋友也推荐过ueditor之类的 很多的
      

  2.   

    现在想使用图片上的小图片做为各个按钮的背景图,
        应该怎么截取图片了
        希望可以兼容各个浏览器。
    re:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <style type="text/css">
    a {
    background-repeat: no-repeat;
    text-indent: -999px;
    display: block !important;
    width: 18px;
    height: 15px;
    }
    a.cur {
    background: url(http://mu8.bdstatic.com/player/t/i/mwRYVJPC.png) no-repeat -120px -72px;
    }
    </style>
    </head><body>
    <a class="cur" href="">
    <span class="wg-button-inner"></span>
    </a>
    </body>
    </html>
      

  3.   

    我想找一个文本编辑工具,用作写博客用的那种,谁可以推荐一下。
    re:http://www.webdesignerdepot.com/2008/12/20-excellent-free-rich-text-editors/