<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<ul>
<li id="a">大王</li>
<li id="b">小王</li>
<li id="c">4个2</li>
</ul>
<p>扑克牌</p>
<script>
var a = document.getElementById('a');
var p = document.getElementsByTagName('p')[0];
Object.prototype.css = function(styleName, styleValue){
this.style[styleName] = styleValue;
return this;
};
p.css('backgroundColor', 'pink');
a.css('color', 'blue').css('fontSize', '30px').css('backgroundColor', 'yellow');
</script>
</body>
</html>