首页javascriptstyleJavascript Style - 如何设置字体大小...

Javascript Style - 如何设置字体大小...

我们想知道如何设置字体大小。...

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(window).load(function(){
$('#elementId').css({
    'height': '60px',
    'width': '268px',
    'display': 'block',
    'float': 'right',
    'background-color': 'red'
});
});
</script>
</head>
<body>
  <div id="elementId"></div>
</body>
</html>