Apply a style to the accordion component

Source: Internet
Author: User
Apply a style to the accordion component

You can set style properties to change the border and background appearance of the accordion component.

The accordion component uses the following styles:

Style

Topic

Description

themeColor

Halo

The basic color scheme of the component. This is the only color style that does not inherit the style value. Possible values include"haloGreen","haloBlue"And"haloOrange".

backgroundColor

Halo and Examples

Background color. The default color is white.

borderStyle

Halo and Examples

The accordion component uses the rectborder instance as its border and responds to the styles defined on this class. For more information, see rectborder class.

The default border style value of the accordion component is"solid".

headerHeight

Halo and Examples

The height (in pixels) of the title button ). The default value is 22.

color

Halo and Examples

Text color. The default value of the "Halo" topic is 0x0b333c, and the default value of the "example" topic is blank.

disabledColor

Halo and Examples

The text color when the component is disabled. The default value is 0x848384 (dark gray ).

embedFonts

Halo and Examples

A boolean value that indicatesfontFamilyWhether the specified font is an embedded font. IffontFamilyIf the embedded font is referenced, the style must be settrue. Otherwise, the embedded font is not used. If this style is settrueAndfontFamilyIf no embedded font is referenced, no text is displayed. The default value isfalse.

fontFamily

Halo and Examples

The font name of the title label. The default value is"_sans".

fontSize

Halo and Examples

The pound value of the title label font. The default value is 10.

fontStyle

Halo and Examples

The font style of the title label;"normal"Or"italic". The default value is"normal".

fontWeight

Halo and Examples

Font width of the title label;"none"Or"bold". The default value is"none".

Before callingsetStyle()During this period, all components can accept the value"normal"To replace"none"But thengetStyle()Will return"none".

textDecoration

Halo and Examples

Text modifier;"none"Or"underline".

openDuration

Halo and Examples

Duration (in milliseconds) of the Transition animation ).

openEasing

Halo and Examples

Reference of the animation population function. The default value is sine input/output. For more information, see custom component animation in "use components.

For example, the following code is namedMy_accThe font style appearance in the accordion instance is set to italic:

my_acc.setStyle("fontStyle", "italic");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.