登录 | 注册 | FAQ
Anonymous

span id

+ 发表回复

3 篇帖子 分页: 1 / 1


span id

simonslatinsek » 周日 7月 06, 2014 9:53 am

hi I would like to have each word in different color(health, wealth, wise) lesson 8, how can I do this?


thank's
Simon
头像

simonslatinsek

  • 帖子: 2
  • 注册: 周日 7月 06, 2014 9:47 am

Re: span id

simonslatinsek » 周日 7月 06, 2014 10:10 am

ok, i have found a way:

#p1 {
color:blue;
}



#p2 {
color:red;
}

#p3 {
color:green;
}
but why I have had do it in html like ID="p1"? because without lettre 'p' is no effect
for what lettre 'p' stands for? and in lesson 7 is used like ID="c1-1" why is here lettre 'c'?

tnaks for answers
头像

simonslatinsek

  • 帖子: 2
  • 注册: 周日 7月 06, 2014 9:47 am

Re: span id

XainPro » 周四 7月 10, 2014 12:34 pm

its just a unique name to identify and link html to css
you can write anything you want after # sign
you can use
#abc or #xyz ;)
Enjoy your html
头像

XainPro

  • 帖子: 3933
  • 注册: 周五 2月 17, 2012 8:10 pm


+ 发表回复

分页: 1 / 1