Jump to content

css question, how to combine?


Freeman35

Recommended Posts

Hello,

How can I combine css in new css class name?

Example:

.Font_name {  
  font-family:Arial;
  font-weight:bold;
  font-style:normal;
}
.Font_ground {
  background-color: #fff;
}
.Size_1 {
    font-size:15px;
}
.Size_2 {
    font-size:12px;
}

how to?

.smallest {
 Font_name, 
 Font_ground,
 Size_2
}
.biggest {
 Font_name,
 Font_ground,
 Size_1
}

Thank you

Link to comment
Share on other sites

Thank you for answer,

 

config.cls='Font_name smallest'

 

Is this mean rigth code ?

.smallest {
 Font_name, 
Font_ground,
Size_2
}

config.cls='Font_name smallest'  is this aqual config.cls='Font_name Font_ground Size_2' ?

if yes, I wanna incliude bootstrap class into my css block, so I plain optimise my css,

for example,

.My_border{...} .My_Font{...} My_ground{...} My_Shadow{..}..... will be my style rules. After then
 

.My_Edit{

.My_border,

.My_Font

}

 

config.cls='My_Edit';

So I'm not write more time "font-family:Arial;........."  I hope I can translate my idea

Thank you

Link to comment
Share on other sites

No no I meant in my post that when using css as class in js you may use multiple css classes with ' ' (space).

In css declaration you cannot combine classes as you did.

Please refer to css declaration in the internet to be more familiar with it. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...