• پایان فعالیت بخشهای انجمن: امکان ایجاد موضوع یا نوشته جدید برای عموم کاربران غیرفعال شده است

سوال درباره : CSS > Style > Display

شايان

مدیران قدیمی
تاریخ عضویت
2 سپتامبر 2003
نوشته‌ها
4,814
لایک‌ها
9
سلام ...
يه Style هست Dsiplay ... ميدونيد كه كارش چيه ديگه ... اگه مقدارشو None بديم ، نشون نميده !!!

حالا بر عكس اين چيه ؟! يعني يه DIV يا SPAN يا هر چيزه ديگه كه قبلا Style ه Display:none داشته ، بخوايم نمايش داده بشه !

مثالشم بزنم كه منظورم و متوجه بشيد :

[code:1]



<span style="display:none;">



 <span style="display: xxx&#59;">

 

   Shayan



 </span>



</span>



[/code:1]

حالا بجاي اون xxx چي بذارم كه اون نوشته ديده بشه ؟!

اگه راهش اين نيست ، لطف كنيد راهنمايي كنيد !
 

amirnezhad

کاربر تازه وارد
تاریخ عضویت
26 جولای 2003
نوشته‌ها
136
لایک‌ها
0
اين دقيقا راهنماي Display توي CSS 2 است
[left:c9b74f8429]'display'
Value: inline | block | list-item | run-in | compact | marker | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | none | inherit
Initial: inline
Applies to: all elements
Inherited: no
Percentages: N/A
Media: all

The values of this property have the following meanings:

block
This value causes an element to generate a principal block box.
inline
This value causes an element to generate one or more inline boxes.
list-item
This value causes an element (e.g., LI in HTML) to generate a principal block box and a list-item inline box. For information about lists and examples of list formatting, please consult the section on lists.
marker
This value declares generated content before or after a box to be a marker. This value should only be used with :before and :after pseudo-elements attached to block-level elements. In other cases, this value is interpreted as 'inline'. Please consult the section on markers for more information.
none
This value causes an element to generate no boxes in the formatting structure (i.e., the element has no effect on layout). Descendant elements do not generate any boxes either; this behavior cannot be overridden by setting the 'display' property on the descendants.
Please note that a display of 'none' does not create an invisible box; it creates no box at all. CSS includes mechanisms that enable an element to generate boxes in the formatting structure that affect formatting but are not visible themselves. Please consult the section on visibility for details.

run-in and compact
These values create either block or inline boxes, depending on context. Properties apply to run-in and compact boxes based on their final status (inline-level or block-level). For example, the 'white-space' property only applies if the box becomes a block box.
table, inline-table, table-row-group, table-column, table-column-group, table-header-group, table-footer-group, table-row, table-cell, and table-caption
These values cause an element to behave like a table element (subject to restrictions described in the chapter on tables).
Note that although the initial value of 'display' is 'inline', rules in the user agent's default style sheet may override this value. See the sample style sheet for HTML 4.0 in the appendix.

Example(s):


Here are some examples of the 'display' property:

P { display: block }
EM { display: inline }
LI { display: list-item }
IMG { display: none } /* Don't display images */
[/left:c9b74f8429]

بنابراين بايد بجاش از مقدار inline استفاده كني كه مقدار پيش فرض هم همينه
 

ehsan

Administrator
مدیر انجمن
Administrator
تاریخ عضویت
5 دسامبر 2002
نوشته‌ها
7,949
لایک‌ها
3,918
محل سکونت
Internet

شايان

مدیران قدیمی
تاریخ عضویت
2 سپتامبر 2003
نوشته‌ها
4,814
لایک‌ها
9
خيلي خيلي منون !!! عالي بود !
 
بالا