Home > Web Front-end > JS Tutorial > Style.display attribute operation in JavaScript_javascript skills

Style.display attribute operation in JavaScript_javascript skills

WBOY
Release: 2016-05-16 17:39:23
Original
1510 people have browsed it

Display version: CSS1/CSS2 Compatibility: IE4 NS4 Inheritance: None

Syntax:

display : block | none | inline | compact | marker | inline-table | list-item | run-in | table |table-caption | table-cell | table-column | table-column-group | table-footer-group | table-header-group | table-row | table- row-group

Parameters:

block : Default value of CSS1 block object. Use this value to add a new line after the object.
none: CSS1 Hidden object. Unlike the hidden value of the visibility attribute, it does not retain its physical space for hidden objects.
inline: CSS1 Default value for inline objects. Use this value to delete rows from the object.
compact: CSS2: Assign the object as a block object or an inline object based on the content.
marker: CSS2: Specify the content before or after the container object. To use this parameter, the object must use
Inline-Table: CSS2 to display the table as the inner parties or the inner coupling container
List-ITEM: CSS1 will block the block. Objects are specified as list items. And you can add optional project flags                                                                                                                                                                                                  
run-in                                                                             :           CSS2: Display the object as a table title                                                                  Table column group display
table-header-group : CSS2 Display the object as a table header group
table-footer-group : CSS2 Display the object as a table footer group
table-row : CSS2 Display the object as a table Row display
table-row-group : CSS2 Display objects as table row groups


Description:


Set or retrieve whether and how the object is displayed.
Currently IE5.5 only supports the above CSS1 parameters.             The corresponding script feature of is display. Please see other books I have written.

Here’s an example: Click to show or hide


Copy code

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template