html - How to call different images with CSS -
i creating industry section, 1 seen in https://squareup.com
i started using nth-of-type call different images in css. http://cssdeck.com/labs/full/vinttbws
however, doesn't work when not in same parent. how can work?
is there way accomplish without having make div class each industry image?
you're right, nth-of-type
won't work because don't share same immediate parent.
i highly recommend suggesting making new class each one.
you give each parent different id , css selector ask child:
#restaurant > { background-image:url(some/picture.jpg); } #retail > { background-image:url(some/other/picture.jpg); }
i've made bit of example here(with colors instead of pictures): http://jsfiddle.net/mo9yazjm/
edit: made change cssdeck example: http://cssdeck.com/labs/t4xnpzgf
Comments
Post a Comment