首页javascriptbackgroundjQuery Style - 如何单击以添加边框...

jQuery Style - 如何单击以添加边框...

我们想知道如何单击以添加边框。...

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.10.1.js'></script>
<style type='text/css'>
body {
  background: url('http://www.w3cschool.cn/style/download.png') no-repeat;
}
</style>
<script type='text/javascript'>
$(function(){
    ratio = 0.2;
    $("body").css({
        "background-size": 1046 * ratio,
        "-webkit-background-size": 1046 * ratio+'px auto',
    });
});
</script>
</head>
<body>
</body>
</html>