@Andrew,
I know the answer has already been accepted, but using display: none;
will be a nightmare to users without Javascript.
Using inline Javascript, you can hide an element without it ever blinking. Users without Javascript will still be able to see it.
Consider a few divs that should be hidden when the page loads.
<head>
<script type="text/javascript" src="jQuery.js"></script>
</head>
<body>
<div id="hide-me">
... some content ...
</div>
<script type="text/javascript">
$("#hide-me").hide();
</script>
<div id="hide-me-too">
... some content ...
</div>
<script type="text/javascript">
$("#hide-me-too").hide();
</script>
</body>
The inline Javascript will run as soon as the element is rendered, thus hiding it from the user.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…