I have seen the new models of Material Design and I've checked about a new way to make bottoms navbar on devices. That new Navbar has a hole on center when there is a button on, but I have tried to make this using CSS and I got a question. What is the best or the correct way to make this? Can you help me?
Look the navbar with the hole and the button:
I tried to make this using box-shadow, clip-path, SVG images, css masks... But all of my solutions had some limitations.
Another questions are: The button has the transparent effect when put on the navbar? Or the navbar has a clipped part to put de button?
Thanks!
I recommend to go for simplicity here, the thing you want to accomplish is a transparent background, so use background.
You can create this effect easily with a gradient background. The gradient background allows you to use different colors as a background and use a shape. You can add this background on the foot-bar.
background: radial-gradient(circle at 150px 0, transparent 50px, #fabada 0) 0 0;
I create an example for you here:
https://codepen.io/luarmr/pen/ajgabq
For the icon just use border-radius
Related
I want to have a transparent png overlay a SVG background as a CSS style in Wordpress.
In the Wordpress back end there is a custom CSS section where I placed this working code.
It is just the background SVG code.
.club {
/** To edit this background, follow this link:
http://svgeneration.com/generate/Happy-Launch Day?
x=50&y=50&radius=50&beam1=ffffff&beam2=52c5ff&beam3=0791b3&shade=ffffff&
*/
background-color: #5EB7CD;background-image:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnPgoJPHJhZGlhbEdyYWRpZW50IGlkPSdnJyBjeD0nNTAlJyBjeT0nNTAlJyByPSc1MCUnPgoJCTxzdG9wIG9mZnNldD0nMCUnIHN0eWxlPSdzdG9wLWNvbG9yOiNmZmZmZmY7JyAvPgoJCTxzdG9wIG9mZnNldD0nNTAlJyBzdHlsZT0nc3RvcC1jb2xvcjojNTJjNWZmOycgLz4KCQk8c3RvcCBvZmZzZXQ9JzEwMCUnIHN0eWxlPSdzdG9wLWNvbG9yOiMwNzkxYjM7JyAvPgoJPC9yYWRpYWxHcmFkaWVudD4KCTxyZWN0IHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIGZpbGw9J3VybCgjZyknLz4KCTxzdmcgeD0nNTAlJy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lKDMyMCknLz4KCQk8cmVjdCB3aWR0aD0nMjAwMCUnIGhlaWdodD0nMjAwMCUnIGZpbGwtb3BhY2l0eT0nMC4xJyBmaWxsPScjZmZmZmZmJyB0cmFuc2Zvcm09J3JvdGF0ZSgzNDApJy8+CgkJPHJlY3Qgd2lkdGg9JzIwMDAlJyBoZWlnaHQ9JzIwMDAlJyBmaWxsLW9wYWNpdHk9JzAuMScgZmlsbD0nI2ZmZmZmZicgdHJhbnNmb3JtPSdyb3RhdGUoMzYwKScvPgoJPC9zdmc+Cjwvc3ZnPg==');
}
I want to overlay this background with this image http://brainclub.nl/3.0/wp-content/uploads/2014/01/Lampjes.png
It is white image with transparent background so you probably wouldn't see it when you click it.
For as far as I can see the problem with combining the two is that the place where I should place the image url is occupied by the SVG code.
background-image:url(
Can anyone help me combine the two?
I will be so grateful.
Thanks.
You can't overlay a bg image as such. You can only overlay elements. You might be able to set multiple background images though by comma separating them.
Codepen Example
Selected CSS
background-image:
url(http://brainclub.nl/3.0/wp-content/uploads/2014/01/Lampjes.png),
url('data:image/svg+xml;base64, **Code chopped**);
}
http://css-tricks.com/stacking-order-of-multiple-backgrounds/
I am using the carousel component from the new Bootstrap 3 RC2. However, I noticed that in practice the caption is often not readable because my pictures very a lot in color. The previous Bootstrap 2.3 used a black gradient for captions but that seems to have been removed.
What would be a way to style my caption with CSS to make them readable against arbitrary images? I have tried to play with shadow and background-color, but that just gets incredibly ugly.
Here some example code: http://bit.ly/1eX8Tz9
In order to get the content displayed on the gray semi-transparent background
Just Add the following code to your css
.carousel-caption{
background: rgba(0,0,0,0.5);
}
See the Demo Here
I'm using CSS to create a set of toggleable buttons.
I'm almost there, but I don't feel I've got the CSS proprerties quite right: http://jsfiddle.net/rrGab/5/
I think the dark border on the selected button is too dark and too sharply delineated, but I don't know how to make it look smoother.
Could someone suggest how to improve the CSS to make it look better?
I'd love to know the general CSS principles of making buttons "pop" out of the page or appear to be recessed into it.
Apologies if StackOverflow isn't the right place for this - would be happy to move it onto a design forum if that is more appropriate.
For a recessed 'letterpress' effect you need two different colored borders, one for the top, one for the bottom, instead of a solid border. Please refer to this article here. This technique is using text-shadow to create the effect with text, but I think you might could use the philosophy behind it and apply it to border color.
I agree that the solid border doesn't really make it pop. What if you again did a two-toned border, but use the 'middle color' that your gradient produces up top, and then your bottom border could be ever so slightly darker than the bottom of your gradient?
I have a following situation:
Div has to have a solid color on top, and then at the bottom thee should be a transparent image 1px wide.
(So final look should be that I have a gradient from top to bottom of div)
When I put :
background: #fff url("../../images/bck1px.png") repeat-x scroll center bottom transparent;
white color is shown over transparent image
I have to do this in CSS2 style!
Can anybody help?
Here is a link... maybe this is what you want to do.
If yes, the trick is to use the image and have it align in the bottom of the div and repeat horizontally. The clear is there to make sure to push the bottom of you container div.
http://jsfiddle.net/etienne_carre/GEkFn/
Good luck
It’s not entirely clear what you’re asking — a transparent image is transparent, so it won’t create a gradient.
In the code you’ve posted, you have applied a white background colour as well as an image (background: #fff url...). If you leave out the colour (background: url...) you shouldn’t get white any more. I don’t know if that’ll solve your problem.
If you could post all the CSS applied to the <div>, that might help.
If someone ever arrives here, future has finally come and there is better ways to do it.
Please refer to the following links for a CSS method:
Gradient opacity on the bottom of div
Right now I have this CSS for a button:
background: #19558D url(../images/gradient.gif) repeat-x top left;
The gradient appears, but the background color doesn't. When I reload the page, the color appears for a split second, but then disappears to the gradient. How can I get both of them to work?
Ok, so you have several options:
1. Use Only Images:
You can do the job by editing the gradient so that it looks exactly how you like it to be, without any new CSS. (This would be the one you used to solve the problem).
2. Use Image on the top and the rest in solid color:
element{ background:#000 (url) top left repeat-x; }
This will place the image in url at the top, and make the rest of the element of a certain solid color. Be aware that if the image covers all of the element and isn't transparent, then the solid color will not be visible.
3. Make the gradient transparent/alpha:
If the gradient covers all of the element, you can make it transparent, or semi transparent, so that the CSS background-color is visible behind it. For example, if you make a gradient that goes from black to transparent, and then add a white CSS bg, then you will get a black to white gradient. Be aware that the only images that will work with this method are .png ones because they are the only ones that support alpha levels (partial transparencies).
is the GIF transparent? I use PNG format as PNG-24 allows alphablending masks, where as GIF only supports transparent or not (1/0)
But I think you need to post a link to it or a image of what it looks like, including the GIF.
We need some pixels specs, such as width and height to fully understand the problem.