Research on picture flip Menu Technology Fastcompany is a work of simplebits.com webmaster's full CSS + Div layout.
Website navigation uses CSS image flip. you can use a: link, a: hover, and so on to display different background-images. I think the author's uniqueness lies in a: hover in CSS...
# Nav a: hover {background-position: 0-20px ;}
# Nav a: active {background-position: 0-40px ;}
The navigation background image uses the same image instead of three in the three states of a: link and a: hover and a: active ~ By using css to vertically locate the background, the button is changed. This saves a single definition of the background image of each button, saves a lot of code, reduces images, and downloads faster and easier to manage.
Buttons are not only a background image, but also contain navigation text.
Home
Hide text with css
# Nav a {padding: 20px 0 0 0; overflow: hidden ;}
Why do we need to write text after it is hidden? The purpose is to see the navigation link when using a plain text browser (or without referencing any CSS.
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.