Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have some experience making linear gradients in CSS but I would really like to make a radial gradient similar to this image
http://i.stack.imgur.com/T85xO.png
Basically a light grey radial positioned at the bottom of the element
You can play with this tool here. Will give you the code as you generate what you want.
http://www.westciv.com/tools/radialgradients/index.html
http://gradients.glrzad.com/
Radial gradients are in an implementation mess right now, Safari doesn't support elliptical radial backgrounds (Webkit Nightly does, so support for Safari is coming soon). Chrome has so many versions I'm not sure about it, and IE9 doesn't support them.
So I'd say your best option is faking it through inset box shadows:
.shadow {
height: 80px;
box-shadow: inset 0 75px 75px #fff,
inset 0 50px 50px #fff,
inset 0 20px 20px #fff,
inset 0 5px 5px #fff;
background: #ccc;
}
http://jsfiddle.net/nmtHf/
24 Ways covered Graidents in Depth this Year with the following article:
http://24ways.org/2010/everything-you-wanted-to-know-about-gradients
Towards the bottom they spend a whole section on radial graidents and
give you two articles of suggested reading:
MDN
Safari
I would suggest the tool robx posted, but if your like me, you like extra reading on understanding of how things work.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last year.
Improve this question
I am wondering how to do this in css :
enter image description here
Basically, I can do everything out of it. But I dont manage to recreate the halo surroundering the borders. Could you please advise ? :)
EDIT :
I am quite stuck at making the border with the fading
This effect can be achieved with box-shadows like so:
.box {
margin: 20px;
padding: 20px;
background: lightgreen;
width: 200px;
}
.halo {
-webkit-box-shadow: 0px 0px 7px 11px rgba(255,165,28,0.59);
box-shadow: 0px 0px 7px 11px rgba(255,165,28,0.59);
}
<div class="box halo">Hello There, I am a box, play with my colours to get different results, use the last two pixel values to play with the size and blur.</div>
In order to learn more about box shadows in CSS, you can find its documentation here: https://www.w3schools.com/cssref/css3_pr_box-shadow.asp
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I want to add 3 green circles with the :before pseudo-element in order to show the in-stock-status of my products similar to below:
http://www.chililips.com/LACOSTE-Lounge-Pant-Schlafhose-lang-gruen
I only know how to apply ONE circle, but how can I add three or more? I also thought of using HTML characters, but there are no green circles...
Box shadows...no pseudo-elements required. Unless you want to.
.blob {
width: 50px;
height: 50px;
background: lime;
border-radius: 50%;
margin: 3em 15em;
box-shadow: 5em 0em 0 lime, 10em 0em 0 lime;
}
<div class="blob"></div>
If you are using font icons you can simply add like single one instead of three same content
.fa-circle:before {
content: "\f111" "\f111" "\f111";
}
This is an example of fontawosome icon,you can manage space between icons by letter-spacing
OR
If you are using image for icon, then just take image with three icons or use multiple background images like background: background1, background 2, ..., backgroundN;
Read more about multiple background images
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How to create a gradient effect for content on a page like the one on this website. There is a background image and the text and images showing the color of the background image which gives a gradient effect. How can I create a similar effect (non-static gradient effect)?
Also is it all CSS or is there any Javascript library that can achieve the result?
Has two div containers positioned over each other. One with a background and the other contains text and images with the css property mix-blend-mode set to screen
The div with the background should have position: absolute; and full width and height
mix-blend-mode: screen;
I have created a fiddle to demonstrate.
mix-blend-mode is not supported by IE or Opera. Read more about it here.
For Text, you can read the link below with demonstration:
http://cssdeck.com/labs/css3-text-gradient
For Image, you can do it by adding a filter on the image:
https://css-tricks.com/almanac/properties/f/filter/
What filter did they used in the website?
-webkit-filter: grayscale(100%) contrast(1.5) drop-shadow(0px 0px 1px white);
filter: grayscale(100%) contrast(1.5) drop-shadow(0px 0px 1px white);
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I've been researching for a while and still can't find a way to make this border on css, so far I've made only one side.
I mean the same border with css not with the picture
This is posible with css3. Take a look: https://developer.mozilla.org/es/docs/Web/CSS/border-image
First: define the width of your border, as you would usually do (border: 30px solid...);
Then specify the caracteristics of the image with border-image:
-You need to set the image with ulr().
-Then set in px (no units) or percentage (%) how to slice the image to create the borders. Notice that to tile the border the image gets sliced in 9 sectors. This number is the distance from the borders of this slice. For example, in a 300x300 px like in this case, if you slice it at 100, you are generating 9 squares of 100x100.
-Finally say if it should repeat, round or stretch.
A tip: this is a bit difficult so my advice is that you make your image tilable in a 3x3 grid, this way the corners will fit the sides.
.box{
width: 200px;
height: 200px;
background: #EEE;
border: 30px solid transparent;
border-image: url("http://i62.tinypic.com/2dh8y1g.jpg") 100 round;
}
<div class="box"></div>
Vendor prefixes arent very necesary any more: http://caniuse.com/#search=border-image
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I am trying to have my image appear on top of a 300px border, as if the border is a background color for the image. This is my code:
.containerpagecontent { border-left: 300px solid #fff; } img { float:left; }
But it is still not working. What am I doing wrong?
NOTE: I cannot simply use background-color for the image, because the end of the image has to extend off the color.
There is no such thing as:
margin-left: 300px solid #fff;
you probably meant:
border-left: 300px solid #fff;
Also, see if something like this might work for you: http://jsfiddle.net/Lb6Rz/. It's using the padding and background properties on a single element to create a border.