如果页面上存在另一个 div,我将如何隐藏 div 并仅显示它?我猜 jquery 或 js 将是要走的路....
<style type="text/css">
.always-here {
display:none;
}
</style>
<div class="im-here">This div exists on this particular page!</div>
<div class="always-here">This div is always here but has the style
display: none unless a div with the class "im-here" exists.</div>