Wednesday, January 18, 2017

css - What's the difference between saying element1, element2 {display: inline block;} and element1 + element2 (display: inline block;)?




What's the difference between



 element1, element2 {display: inline block;}


and



element1 + element2 (display: inline block;)


in terms of display?


Answer



"+" is the adjacent sibling selector. It will select any element DIRECTLY AFTER element (not a child or parent though, a sibling).


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...