Responsive Web Dedign(三)
freeCodeCamp —- Responsive Web Dedign
Learn CSS Colors by Building a Set of Colored Markers
As you’ve seen in the previous projects, webpages should start with a
DOCTYPE htmldeclaration, followed by anhtmlelement.Add a
DOCTYPE htmldeclaration at the top of the document, and anhtmlelement after that. Give thehtmlelement alangattribute withenas its value.Nest a
headelement within thehtmlelement. Just after theheadelement, add abodyelement.Remember that the
titleelement gives search engines extra information about the page. It also displays the content of thattitleelement in two more ways:- in the title bar when the page is open
- in the browser tab for the page when you hover on it. Even if that tab is not active, once you hover on the tab, the
titletext is displayed.
Within the
headelement, nest atitleelement with the textColored Markers.To tell browsers how to encode characters on your page, set the
charsettoutf-8.utf-8is a universal character set that includes almost every character from all human languages.Inside the
headelement, nest ametaelement with the attributecharsetset toutf-8. Remember thatmetaelements are self-closing, and do not need a closing tag.You can have multiple self-closing
metaelements on a web page. What distinguishes onemetaelement from the other is the attribute. You should add a new meta element for each attribute you want to specify.Add another self-closing
metaelement within thehead. Give it anameattribute set toviewportand acontentattribute set towidth=device-width, initial-scale=1.0so your page looks the same on all devices.Now you’re ready to start adding content to the page.
Within the
body, nest anh1element with the textCSS Color Markers.In this project you’ll work with an external CSS file to style the page. We’ve already created a
styles.cssfile for you. But before you can use it, you’ll need to link it to the page.Nest a
linkelement within theheadelement. Give it arelattribute set tostylesheetand anhrefattribute set tostyles.css.Now that your external CSS file is set up, you can start styling the page.
As a reminder, here’s how to target a paragraph element and align it to the right:
1
2
3p {
text-align: right;
}Create a new CSS rule that targets the
h1element, and set itstext-alignproperty tocenter.Now you’ll add some elements that you’ll eventually style into color markers.
First, within the
bodyelement, add adivelement and set itsclassattribute tocontainer. Make sure thedivelement is below theh1element.Next, within the
divelement, add anotherdivelement and give it a class ofmarker.It’s time to add some color to the marker. Remember that one way to add color to an element is to use a color keyword like
black,cyan, oryellow.As a reminder, here’s how to target the class
freecodecamp:1
2
3.freecodecamp {
}Create a new CSS rule that targets the class
marker, and set itsbackground-colorproperty tored.Note: You will not see any changes after adding the CSS.
The background color was applied, but since the marker
divelement has no content in it, it doesn’t have any height by default.In your
.markerCSS rule, set theheightproperty to25pxand thewidthproperty to200pxYour marker would look better if it was centered on the page. An easy way to do that is with the
marginshorthand property.In the last project, you set the margin area of elements separately with properties like
margin-topandmargin-left. Themarginshorthand property makes it easy to set multiple margin areas at the same time.To center your marker on the page, set its
marginproperty toauto. This setsmargin-top,margin-right,margin-bottom, andmargin-leftall toauto.Now that you’ve got one marker centered with color, it’s time to add the other markers.
In the
containerdiv, add two moredivelements and give them each a class ofmarker.While you have three separate marker
divelements, they look like one big rectangle. You should add some space between them to make it easier to see each element.When the shorthand
marginproperty has two values, it setsmargin-topandmargin-bottomto the first value, andmargin-leftandmargin-rightto the second value.In your
.markerCSS rule, set themarginproperty to10px auto.To give the markers different colors, you will need to add a unique class to each one. Multiple classes can be added to an element by listing them in the
classattribute and separating them with a space. For example, the following adds both theanimalanddogclasses to adivelement.1
<div class="animal dog">
If you add multiple classes to an HTML element, the styles of the first classes you list may be overridden by later classes.
To begin, add the class
oneto the first markerdivelement.Next, remove the
background-colorproperty and its value from the.markerCSS rule.Then, create a new CSS rule that targets the class
oneand set itsbackground-colorproperty tored.Add the class
twoto the second markerdiv, and add the classthreeto the third markerdiv.Create a CSS rule that targets the class
twoand set itsbackground-colorproperty togreen.Also, create a separate CSS rule that targets the class
threeand set itsbackground-colortoblue.There are two main color models: the additive RGB (red, green, blue) model used in electronic devices, and the subtractive CMYK (cyan, magenta, yellow, black) model used in print.
In this project, you’ll work with the RGB model. This means that colors begin as black, and change as different levels of red, green, and blue are introduced. An easy way to see this is with the CSS
rgbfunction.Create a new CSS rule that targets the class
containerand set itsbackground-colorto black withrgb(0, 0, 0).A function is a piece of code that can take an input and perform a specific action. The CSS
rgbfunction accepts values, or arguments, for red, green, and blue, and produces a color:1
rgb(red, green, blue);
Each red, green, and blue value is a number from
0to255.0means that there’s 0% of that color, and is black.255means that there’s 100% of that color.In the
.oneCSS rule, replace the color keywordredwith thergbfunction. For thergbfunction, set the value for red to255, the value for green to0, and the value for blue to0.Notice that the
background-colorfor your marker is still red. This is because you set the red value of thergbfunction to the max of255, or 100% red, and set both the green and blue values to0.Now use the
rgbfunction to set the other colors.In the
.twoCSS rule, use thergbfunction to set thebackground-colorto the max value for green, and0for the other values. And in the.threeCSS rule, use thergbfunction to set thebackground-colorto the max value for blue, and0for the other values.While the red and blue markers look the same, the green one is much lighter than it was before. This is because the
greencolor keyword is actually a darker shade, and is about halfway between black and the maximum value for green.In the
.twoCSS rule, set the green value in thergbfunction to127to lower its intensity.Now add a little more vertical space between your markers and the edge of the
containerelement they’re in.In the
.containerCSS rule, use the shorthandpaddingproperty to add10pxof top and bottom padding, and set the left and right padding to0. This works similarly to the shorthandmarginproperty you used earlier.In the additive RGB color model, primary colors are colors that, when combined, create pure white. But for this to happen, each color needs to be at its highest intensity.
Before you combine colors, set your green marker back to pure green. For the
rgbfunction in the.twoCSS rule, set green back to the max value of255.Now that you have the primary RGB colors, it’s time to combine them.
For the
rgbfunction in the.containerrule, set the red, green, and blue values to the max of255.Secondary colors are the colors you get when you combine primary colors. You might have noticed some secondary colors in the last step as you changed the red, green, and blue values.
To create the first secondary color, yellow, update the
rgbfunction in the.oneCSS rule to combine pure red and pure green.To create the next secondary color, cyan, update the
rgbfunction in the.twoCSS rule to combine pure green and pure blue.To create the final secondary color, magenta, update the
rgbfunction in the.threeCSS rule to combine pure blue and pure red.Now that you’re familiar with secondary colors, you’ll learn how to create tertiary colors. Tertiary colors are created by combining a primary with a nearby secondary color.
To create the tertiary color orange, update the
rgbfunction in the.oneCSS rule so that red is at the max value, and set green to127.Notice that, to create orange, you had to increase the intensity of red and decrease the intensity of the green
rgbvalues. This is because orange is the combination of red and yellow, and falls between the two colors on the color wheel.To create the tertiary color spring green, combine cyan with green. Update the
rgbfunction in the.twoCSS rule so that green is at the max value, and set blue to127.And to create the tertiary color violet, combine magenta with blue. Update the
rgbfunction in the.threeCSS rule so that blue is at the max value, and set red to127.There are three more tertiary colors: chartreuse green (green + yellow), azure (blue + cyan), and rose (red + magenta).
To create chartreuse green, update the
rgbfunction in the.oneCSS rule so that red is at127, and set green to the max value.For azure, update the
rgbfunction in the.twoCSS rule so that green is at127and blue is at the max value.And for rose, which is sometimes called bright pink, update the
rgbfunction in the.threeCSS rule so that blue is at127and red is at the max value.Now that you’ve gone through all the primary, secondary, and tertiary colors on a color wheel, it’ll be easier to understand other color theory concepts and how they impact design.
First, in the CSS rules
.one,.two, and.three, adjust the values in thergbfunction so that thebackground-colorof each element is set to pure black. Remember that thergbfunction uses the additive color model, where colors start as black and change as the values of red, green, and blue increase.A color wheel is a circle where similar colors, or hues, are near each other, and different ones are further apart. For example, pure red is between the hues rose and orange.
Two colors that are opposite from each other on the color wheel are called complementary colors. If two complementary colors are combined, they produce gray. But when they are placed side-by-side, these colors produce strong visual contrast and appear brighter.
In the
rgbfunction for the.oneCSS rule, set the red value to the max of255to produce pure red. In thergbfunction for.twoCSS rule, set the values for green and blue to the max of255to produce cyan.Notice that the red and cyan colors are very bright right next to each other. This contrast can be distracting if it’s overused on a website, and can make text hard to read if it’s placed on a complementary-colored background.
It’s better practice to choose one color as the dominant color, and use its complementary color as an accent to bring attention to certain content on the page.
First, in the
h1rule, use thergbfunction to set itsbackground-colorto cyan.Next, in the
.oneCSS rule, use thergbfunction to set thebackground-colorto black. And in the.twoCSS rule, use thergbfunction to set thebackground-colorto red.Notice how your eyes are naturally drawn to the red color in the center? When designing a site, you can use this effect to draw attention to important headings, buttons, or links.
There are several other important color combinations outside of complementary colors, but you’ll learn those a bit later.
For now, use the
rgbfunction in the.twoCSS rule to set thebackground-colorto black.And in the
h1CSS rule, remove thebackground-colorproperty and value to go back to the default white color.Now it’s time to add other details to the markers, starting with the first one.
In the first marker
divelement, change the classonetored.Update the
.oneCSS rule to target the newredclass.And update the
rgbfunction in the.redCSS rule so that the red value is at the max.Next, change the class
twotogreenin the second markerdiv, and the classthreetobluein the third markerdiv.Update the CSS class selector
.twoso it targets the newgreenclass. And update the.threeclass selector so it targets the newblueclass.A very common way to apply color to an element with CSS is with hexadecimal or hex values. While hex values sound complicated, they’re really just another form of RGB values.
Hex color values start with a
#character and take six characters from 0-9 and A-F. The first pair of characters represent red, the second pair represent green, and the third pair represent blue. For example,#4B5320.In the
.greenclass selector, set thebackground-colorproperty to a hex color code with the values00for red,FFfor green, and00blue.You may already be familiar with decimal, or base 10 values, which go from 0 - 9. Hexadecimal, or base 16 values, go from 0 - 9, then A - F:
1
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
With hex colors,
00is 0% of that color, andFFis 100%. So#00FF00translates to 0% red, 100% green, and 0% blue, and is the same asrgb(0, 255, 0).Lower the intensity of green by setting the green value of the hex color to
7F.The HSL color model, or hue, saturation, and lightness, is another way to represent colors.
The CSS hsl function accepts 3 values: a number from 0 to 360 for hue, a percentage from 0 to 100 for saturation, and a percentage from 0 to 100 for lightness.
If you imagine a color wheel, the hue red is at 0 degrees, green is at 120 degrees, and blue is at 240 degrees.
Saturation is the intensity of a color from 0%, or gray, to 100% for pure color. You must add the percent sign
%to the saturation and lightness values.Lightness is how bright a color appears, from 0%, or complete black, to 100%, complete white, with 50% being neutral.
In the
.blueCSS rule, use thehslfunction to change thebackground-colorproperty to pure blue. Set the hue to240, the saturation to100%, and the lightness to50%.You’ve learned a few ways to set flat colors in CSS, but you can also use a color transition, or gradient, on an element.
A gradient is when one color transitions into another. The CSS
linear-gradientfunction lets you control the direction of the transition along a line, and which colors are used.One thing to remember is that the
linear-gradientfunction actually creates animageelement, and is usually paired with thebackgroundproperty which can accept an image as a value.In the
.redCSS rule, change thebackground-colorproperty tobackground.The
linear-gradientfunction is very flexible – here is the basic syntax you’ll use in this tutorial:1
linear-gradient(gradientDirection, color1, color2, ...);
gradientDirectionis the direction of the line used for the transition.color1andcolor2are color arguments, which are the colors that will be used in the transition itself. These can be any type of color, including color keywords, hex,rgb, orhsl.Now you’ll apply a red-to-green gradient along a 90 degree line to the first marker.
First, in the
.redCSS rule, set thebackgroundproperty tolinear-gradient(), and pass it the value90degas thegradientDirection.You’ll use the
rgbfunction for the colors of this gradient.In the
linear-gradientfunction, use thergbfunction to set the first color argument to pure red.You won’t see gradient yet because the
linear-gradientfunction needs at least two color arguments to work.In the same
linear-gradientfunction, use thergbfunction to set the second color argument to pure green.As you can see, the
linear-gradientfunction produced a smooth red-green gradient. While thelinear-gradientfunction needs a minimum of two color arguments to work, it can accept many color arguments.Use the
rgbfunction to add pure blue as the third color argument to thelinear-gradientfunction.Color-stops allow you to fine-tune where colors are placed along the gradient line. They are a length unit like
pxor percentages that follow a color in thelinear-gradientfunction.For example, in this red-black gradient, the transition from red to black takes place at the 90% point along the gradient line, so red takes up most of the available space:
1
linear-gradient(90deg, red 90%, black);
In the
linear-gradientfunction, add a75%color stop after the first red color argument. Do not add color stops to the other colors arguments.Now that you know the basics of how the
linear-gradientfunction and color-stops work, you can use them to make the markers look more realistic.In the
linear-gradientfunction, setgradientDirectionto180deg.Next, set the color-stop for red to
0%, the color-stop for green to50%, and the color-stop for blue to100%.Now that the color-stops are set, you’ll apply different shades of red to each color argument in the
linear-gradientfunction. The shades on the top and bottom edges of the marker will be darker, while the one in the middle will be lighter, as if there’s a light above it.For the first color argument, which is currently pure red, update the
rgbfunction so the value for red is122, the value for green is74, and the value for blue is14.Now modify the second color argument in the
linear-gradientfunction, which is currently pure green.Update the
rgbfunction so the value for red is245, the value of green is62, and the value of blue is113.Finally, modify the third color argument in the
linear-gradientfunction, which is currently pure blue.Update the
rgbfunction so the value for red is162, the value of green is27, and the value of blue is27.The red marker is looking much more realistic. Now you’ll do the same for the green marker, using a combination of the
linear-gradientfunction and hex colors.In the
.greenCSS rule, change thebackground-colorproperty tobackground.For this marker, you’ll use hex color codes for your gradient.
Use the
linear-gradientfunction and setgradientDirectionto180deg. And for the first color argument, use a hex color code with the values55for red,68for green, and0Dfor blue.For the second color argument, use a hex color code with the values
71for red,F5for green, and3Efor blue.That’s looking better, but the bottom edge of the green marker needs to be darker to add a little more dimension.
In the same
linear-gradientfunction, add a hex color code with the values11for red,6Cfor green, and31for blue as the third color argument.Even without the color-stops, you might have noticed that the colors for the green marker transition at the same points as the red marker. The first color is at the start (0%), the second is in the middle (50%), and the last is at the end (100%) of the gradient line.
The
linear-gradientfunction automatically calculates these values for you, and places colors evenly along the gradient line by default.In the
.redCSS rule, remove the three color stops from thelinear-gradientfunction to clean up your code a bit.If no
gradientDirectionargument is provided to thelinear-gradientfunction, it arranges colors from top to bottom, or along a 180 degree line, by default.Clean up your code a little more by removing the
gradientDirectionargument from bothlinear-gradientfunctions.Now you’ll apply a gradient to the blue marker, this time using the
hslfunction as color arguments.In the
.blueCSS rule, change thebackground-colorproperty tobackground.Use the
linear-gradientfunction, and pass in thehslfunction with the values186for hue,76%for saturation, and16%for lightness as the first color argument.As the second color argument, pass in the
hslfunction with the values223for hue,90%for saturation, and60%for lightness.And as the third color argument, pass in the
hslfunction with the values240for hue,56%for saturation, and42%for lightness.Now that the markers have the correct colors, it’s time to build the marker sleeves. Start with the red marker.
Inside the red marker
divelement, create a newdivelement and give it a class ofsleeve.Create a new CSS rule that targets the class
sleeve. Set thewidthproperty to110px, and theheightproperty to25px.To make the marker look more realistic, give the sleeve a transparent white color.
First, set the sleeve element’s
background-colortowhite.Opacity describes how opaque, or non-transparent, something is. For example, a solid wall is opaque, and no light can pass through. But a drinking glass is much more transparent, and you can see through the glass to the other side.
With the CSS
opacityproperty, you can control how opaque or transparent an element is. With the value0, or 0%, the element will be completely transparent, and at1.0, or 100%, the element will be completely opaque like it is by default.In the
.sleeveCSS rule, set theopacityproperty to0.5.Another way to set the opacity for an element is with the alpha channel. Similar to the
opacityproperty, the alpha channel controls how transparent or opaque a color is.You’ve already set sleeve’s opacity with a named color and the
opacityproperty, but you can add an alpha channel to the other CSS color properties.Inside the
.sleeverule, remove theopacityproperty and value.You’re already familiar with using the
rgbfunction to set colors. To add an alpha channel to anrgbcolor, use thergbafunction instead.The
rgbafunction works just like thergbfunction, but takes one more number from0to1.0for the alpha channel:1
rgba(redValue, greenValue, blueValue, alphaValue);
You can also use an alpha channel with
hslandhexcolors. You will see how to do that soon.In the
.sleeverule, use thergbafunction to set thebackground-colorproperty to pure white with 50% opacity.Your sleeve is looking good, but it would look even better if it was positioned more toward the right side of the marker. One way to do that is to add another element before the sleeve to push it to the right.
Add a new
divwith the classcapbefore the sleevedivelement.Create a new CSS rule to target the class
cap. In the new rule, set thewidthproperty to60px, and theheightto25px.It looks like your sleeve disappeared, but don’t worry – it’s still there. What happened is that your new cap
divis taking up the entire width of the marker, and is pushing the sleeve down to the next line.This is because the default
displayproperty fordivelements isblock. So when twoblockelements are next to each other, they stack like actual blocks. For example, your marker elements are all stacked on top of each other.To position two
divelements on the same line, set theirdisplayproperties toinline-block.Create a new rule to target both the
capandsleeveclasses, and setdisplaytoinline-block.In the last project, you learned a little bit about borders and the
border-colorproperty.All HTML elements have borders, though they’re usually set to
noneby default. With CSS, you can control all aspects of an element’s border, and set the border on all sides, or just one side at a time. For a border to be visible, you need to set its width and style.In the
.sleeveCSS rule, add theborder-left-widthproperty with the value10px.Borders have several styles to choose from. You can make your border a solid line, but you can also use a dashed or dotted line if you prefer. Solid border lines are probably the most common.
In the
.sleeveCSS rule, add theborder-left-styleproperty with the valuesolid.Your border should be visible now. If no color is set, black is used by default.
But to make your code more readable, it’s better to set the border color explicitly.
In the
.sleeveCSS rule, add theborder-left-colorproperty with the valueblack.The
border-leftshorthand property lets you to set the left border’s width, style, and color at the same time.Here is the syntax:
1
border-left: width style color;
In the
.sleeveCSS rule, replace theborder-left-width,border-left-style, andborder-left-colorproperties with theborder-leftshorthand property. The values for the width, style, and color of the left border should be the same.Your marker is looking good. But to make it look even more realistic, you can change the border style to double solid borders.
For the
border-leftshorthand property, change the border style value fromsolidtodouble.The black color of your border looks pretty harsh against the more transparent sleeve. You can use an alpha channel to lower the opacity of the black border.
For the
border-leftshorthand property, use thergbafunction to set the color value to pure black with 75% opacity.Awesome. Your red marker is looking good. Now all you need to do is add the caps and sleeves to your other markers.
Add a cap and sleeve to both the green and blue markers. You can just copy the
divelements from the red marker and paste them into the other two markers.The last thing you’ll do is add a slight shadow to each marker to make them look even more realistic.
The
box-shadowproperty lets you apply one or more shadows around an element. Here is basic syntax:1
box-shadow: offsetX offsetY color;
Here’s how the
offsetXandoffsetYvalues work:- both
offsetXandoffsetYaccept number values inpxand other CSS units - a positive
offsetXvalue moves the shadow right and a negative value moves it left - a positive
offsetYvalue moves the shadow down and a negative value moves it up - if you want a value of zero (
0) for any or bothoffsetXandoffsetY, you don’t need to add a unit. Every browser understands that zero means no change.
The height and width of the shadow is determined by the height and width of the element it’s applied to. You can also use an optional
spreadRadiusvalue to spread out the reach of the shadow. More on that later.Start by adding a simple shadow to the red marker.
In the
.redCSS rule, add thebox-shadowproperty with the values5pxforoffsetX,5pxforoffsetY, andredforcolor.- both
As you can see, you added a simple red shadow around your marker that’s 5 pixels to the right, and 5 pixels down.
But what if you wanted to position your shadow on the opposite side? You can do that by using negative values for
offsetXandoffsetY.Update the values for the
box-shadowproperty, and setoffsetXto-5px, andoffsetYto-5px.Notice that the edges of the shadow are sharp. This is because there is an optional
blurRadiusvalue for thebox-shadowproperty:1
box-shadow: offsetX offsetY blurRadius color;
If a
blurRadiusvalue isn’t included, it defaults to0and produces sharp edges. The higher the value ofblurRadius, the greater the blurring effect is.In the
.greenCSS rule, add thebox-shadowproperty with the values5pxforoffsetX,5pxforoffsetY,5pxforblurRadius, andgreenforcolor.But what if you wanted to expand the shadow out further? You can do that with the optional
spreadRadiusvalue:1
box-shadow: offsetX offsetY blurRadius spreadRadius color;
Like
blurRadius,spreadRadiusdefaults to0if it isn’t included.Practice by adding a 5 pixel shadow directly around the blue marker.
In the
.blueCSS rule, add thebox-shadowproperty with the values0foroffsetX,0foroffsetY,0forblurRadius,5pxforspreadRadius, andblueforcolor.Now that you’re familiar with the
box-shadowproperty you can finalize the shadows, starting with the one for the red marker.In the
.redCSS rule, update the values for thebox-shadowproperty sooffsetXis0,offsetYis0,blurRadiusis20px,spreadRadiusis0, andcolorisred. Remember that you don’t need to add units to a zero value.Next, update the
colorvalue of the red marker’sbox-shadowproperty.Replace the named color with the
rgbafunction. Use the values83for red,14for green,14for blue and0.8for the alpha channel.The shadows for your green and blue markers will have the same position, blur, and spread. The only difference will be the colors.
In the
.greenand.blueCSS rules, update the values for thebox-shadowproperties sooffsetXis0,offsetYis0,blurRadiusis20px, andspreadRadiusis0. Leave the colors asgreenandbluefor now.For the green marker’s
box-shadowproperty, replace the named color with a hex color code. Use the values3Bfor red,7Efor green,20for blue, andCCfor the alpha channel.Finally, for the blue marker’s
box-shadowproperty, replace the named color with thehslafunction. Use the values223for hue,59%for saturation,31%for lightness, and0.8for the alpha channel.And with that, your set of colored markers is complete! Well done.
```html
Colored Markers <body> <h1>CSS Color Markers</h1> <div class="container"> <div class="marker red"> <div class="cap"></div> <div class="sleeve"></div> </div> <div class="marker green"> <div class="cap"></div> <div class="sleeve"></div> </div> <div class="marker blue"> <div class="cap"></div> <div class="sleeve"></div> </div> </div> </body>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
```css
h1 {
text-align:center;
/*background-color:rgb(0,255,255);*/
}
.container{
background-color:rgb(255,255,255);
padding:10px 0;
}
.marker {
/* background-color:red;*/
height:25px;
width:200px;
margin:10px auto;
}
.cap{
width:60px;
height:25px;
}
.sleeve{
width: 110px;
height: 25px;
background-color: rgba(255, 255, 255, 0.5);
border-left: 10px double rgba(0, 0, 0, 0.75);
}
.cap,
.sleeve{
display:inline-block;
}
.red{
/*background-color:rgb(255,127,0);*/
background: linear-gradient(rgb(122, 74, 14), rgb(245, 62, 113), rgb(162, 27, 27));
box-shadow: 0 0 20px 0 rgba(83, 14, 14, 0.8);
}
.green{
background: linear-gradient(180deg, #55680D, #71F53E,#116C31);
box-shadow: 0 0 20px 0 #3B7E20CC;
}
.blue{
background: linear-gradient(hsl(186, 76%, 16%), hsl(223, 90%, 60%),hsl(240, 56%, 42%));
box-shadow: 0 0 20px 0 hsla(223,59%,31%,0.8);
}