Comments (6)
Remember to change the #toggle background in css:
background: #ddd url("/static/images/hamburger.png") no-repeat 50% 33%;
from responsive-nav.js.
Hi lagoLast,
thank you for answer me!
Maybe my question is not specific enough.
But I would like to know how to change the color of a transparent gif only with CSS?
In your example above the background color change, but the hamburger icon itself remain its grey color .
from responsive-nav.js.
Manipulating images is not possible with CSS alone - at least not with any kind of acceptable browser-support ( See -webkit-filters but it is a non-standard, experimental approach so no valid option). What you could do with CSS however is to utilise pseudo-element-techniques or icon-fonts to generate a hamburger. Chris Coyier has a great roundup on different techniques: http://css-tricks.com/three-line-menu-navicon/ They require some CSS-knowledge and maybe some tweaking, but you will be able to change the color directly in CSS.
from responsive-nav.js.
Hey guys,
please see into the advanced demo folder on this project!
There is an transparent hamburger.gif icon.
In the css file (same folder) you can give this f***ing gif any color you want.
Try it yourself!
My question is, how to make this kind of transparent gif!
Hope its clear now.
Best, andalusi.
from responsive-nav.js.
The gif in the advanced folder is made the other way round - instead of having a colored "hamburger" the space around the "hamburger" is colored in the gif - with the page background, which is #fff, leaving the hamburger transparent. So if you want to do it this way, you can edit the "hamburger" by setting multiple background in CSS with the first being a color as in the demo css. But you have to know the page-background, so it is not more dynamic. Fired up Pixelmator, maybe an image is clearer. The red is any background and the selected element is the actual gif: http://puu.sh/3ts18.png
from responsive-nav.js.
Ok, now it makes sense.
Wouldn't it be awesome making just a transparent .gif or .png and apply both color and background-color only with CSS? It would safe a lot of time because changing the color using Pixelmator or Photoshop its sometimes to complicated.
Anyway, thanks for your kind explanation.
from responsive-nav.js.
Related Issues (20)
- Navigation height with nested <ul> HOT 2
- responsiveNav is not defined HOT 2
- left nav cascaded
- Nav is buged
- closeOnNavClick variable changes location
- Multi-Level Responsive Nav
- Just a navigation. Clicking on navigation doesn't slide to anchor points?
- Checking if class exists
- Add opacity onScroll
- Support for Multi-level Nav HOT 1
- Appears from left or right
- Change hamburger to be an image so doesnt flash on page load
- Multilevel not opening on Android Chrome
- Using different customToggle when js-nav-active
- Plugin installation failed. (No valid plugins were found.)
- Nav not scrollable on dropdowns (where submenus available)
- Not working
- Unable to preventDefault inside passive event listener invocation. HOT 1
- How to initialize with a toggle?
- Explanation for installation process
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from responsive-nav.js.