Home >Web Front-end >JS Tutorial >JQuery—display and Show() methods
<br>
#Show hidden matching elements.
<br>
This is the non-animated version of 'show(speed, [callback])'. If the selected element is visible, this method will not change anything. This method will work regardless of whether the element is hidden via the hide() method or display:none; is set in CSS.
<p style="display: none">Hello</p>
$("p").show("fast",function(){ $(this).text("Animation Done!"); });
<br>
<br>
<br>
<br>
定义和用法display 属性规定元素应该生成的框的类型。
value | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
none | This element will not be displayed. | ||||||||||||||||||||||
block | This element will be displayed as a block-level element, with line breaks before and after this element. | ||||||||||||||||||||||
inline | Default. This element will be displayed as an inline element, with no line breaks before or after the element. | ||||||||||||||||||||||
inline-block | Inline block element. (CSS2.1 New value) | ||||||||||||||||||||||
list-item | This element will be displayed as a list. | ||||||||||||||||||||||
run-in | This element will appear as a block-level element or an inline element, depending on the context. | ||||||||||||||||||||||
compact | The value compact was present in CSS, but was removed from CSS2.1 due to lack of widespread support. | ||||||||||||||||||||||
marker | The value marker exists in CSS, but has been removed from CSS2.1 due to lack of widespread support. | ||||||||||||||||||||||
table | This element will be displayed as a block-level table (similar to
|