Gradient effect on text and images [closed] - css

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);

Related

Bright semi transparent about spotify? [closed]

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 6 years ago.
Improve this question
Recently I rebuild the Spotify home page using pure Javascript and scss to test my front-end study, Here is the link.It's not finished yet.
You can see the the difference between mine and the real one is the big-background, the markup is
<div class="bg-main">
<sceiotn class="can-see-the-background-image-1"></section>
<sceiotn class="can-see-the-background-image-2"></section>
</div>
I gave the section rgba(rgb,0.7) background,You can see the effect is not that bright as the real one,which can see the back albums clearly.I dig into their source code,But I didn't find the trick.
Solution
First, add the gradient to the background property on your element <div class="bg-main">:
.bg-main {
width: 100%;
height: auto;
background-attachment: fixed;
background: url(../img/bg-albums.png) repeat,
linear-gradient(50deg, rgba(255, 65, 105, 1) 0,
rgba(124, 38, 248, 1) 100%) repeat
position: relative;
}
Then, in your element <header class="header"> remove the gradient from the background property:
.header {
height: 760px;
width: 100%;
text-align: center;
}
Explanation
The reason Spotify's is clear to see is because the background colour gradient is on the same element as the image. So the image is superimposed on top of the background gradient.
On your site you have the image underneath, and then you place a faded background over the top - making it more difficult to see. With the image on top of the gradient background, it makes the album art much clearer and easier to see.
final result

carousel slider showing extra space when viewed in small devices [closed]

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 7 years ago.
Improve this question
I have a carousel slider which works perfectly in large screens. But when the same is viewed in small devices, a extra space of gray background is added. The same can be viewed in (ctrl+shift+m) in firefox of this SITE LINK . When viewed in firebug, I have noticed that it might due to
element.style {
height:345.6px
}
If I remove the height, it works perfectly. How to fix this ?
UPDATE: If no slider appears, please select change city to Guwahati
I would need more information to help you. Are you using some kind of template? Do you have access to the the raw HTML or CSS? Please be more clear about how we can help.
Edit:
True this should be a comment. Sorry about that. Give the element a specific class and override the template CSS. Something like this:
HTML:
<section id="home" class="customHeightStyle home-section home-parallax home-fade bg-dark-30" data-background="" style="height: 480.24px; top: 0px; background-position: 82px 38px, 44px 31px, 22px 15px;">
CSS:
.customHeightStyle {
height: auto !important;
}
In html, add the same image as background for the parent .item. And use background-size:cover;
For small screen sizes, hide the image using opacity or visibility.
Increase the height of .carousel, .carousel-inner and .item to 100%.
Because you have set height of the container element and then styled the image to be 100% in width.
The upper image is trying to preserve best aspect ratio. You need to set the height of containers properly and then try adding images as cover photos to individual sliders with background-image and background-size property.
Remove youe section style height: 5371.2px;
<section id="home" class="home-section home-parallax home-fade bg-dark-30" data-background="" style="background-position: 20px 8px, 11px 6px, 5px 3px;">

Decorative border css [closed]

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

Place image on border [closed]

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.

radial gradients in CSS3 [closed]

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.

Resources