选择文本改变浏览器默认的背景色和前景色

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <!--
    /**
     * Created by JetBrains WebStorm.
     * User: Ganler
     * Date: 13-5-29
     * Time: 下午10:05
     * To change this template use File | Settings | File Templates.
     */
     -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <style type="text/css">
        ::selection {
            background: #005eac;
            color: #fff
        }

        ::-moz-selection {
            background: #005eac;
            color: #fff;
        }

        ::-webkit-selection {
            background: #005eac;
            color: #fff
        }
    </style>
</head>
<body>
sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份sdfsdfsdfsdf桑德菲杰松岛枫的身份
</body>
</html>

 

posted @ 2013-05-29 22:10  Ganler1988  阅读(945)  评论(0编辑  收藏  举报