4.3 Write a CSS rule that makes all text 1.5 times larger than the base font of
ID: 3732633 • Letter: 4
Question
4.3 Write a CSS rule that makes all text 1.5 times larger than the base font of the system and colors the text red.
4.4 Write a CSS rule that places a background image halfway down the page, tiling it horizon- tally. The image should remain in place when the user scrolls up or down.
4.5 Write a CSS rule that gives all h1 and h2 elements a padding of 0.5 ems, a dashed border style and a margin of 0.5 ems.
4.6 Write a CSS rule that changes the color of all elements containing attribute class = "greenMove" to green and shifts them down 25 pixels and right 15 pixels.
5.3 Create a text shadow on the phrase "New features in CSS3" with a horizontal offset of 2px, a vertical offset of 5px, a blur radius of 6px and a text-shadow color deepskyblue.
5.5 Create three div elements, each with a width and height of 100px. On the first element, create slightly rounded corners using a border of 3px black and border-radius of of 10px. On the second element, use a borderof 3px black and increase the border-radius to 50px. On the third, use a border of 3px black and increase the border-radius to 100px. Make the back-ground-color of each element a different color of your choosing. Inside each element, display the value of the border-radius in bold text.
Explanation / Answer
4.3 Write a CSS rule that makes all text 1.5 times larger than the base font of the system and colors the text red.
Anw :
-------------------------------------------------
4.4 Write a CSS rule that places a background image halfway down the page, tiling it horizon- tally. The image should remain in place when the user scrolls up or down.
4.5 Write a CSS rule that gives all h1 and h2 elements a padding of 0.5 ems, a dashed border style and a margin of 0.5 ems.
Ans : h1, h2 { padding: 0.5ems;border: dashed #000000; margin:0.5ems }
4.6 Write a CSS rule that changes the color of all elements containing attribute class = "greenMove" to green and shifts them down 25 pixels and right 15 pixels.
Ans:
Example : <div class="greenMove"> Sample Text </div>
.greenMove{
text-color: "green";
align-down:25px;
aligh-right: 15px;
}
5.5 Create a text shadow on the phrase "New features in CSS3" with a horizontal offset of 2px, a vertical offset of 5px, a blur radius of 6px and a text-shadow color deepskyblue.
<!DOCTYPE html>
<html>
<head>
<style>
div.ex1 {
margin: 20px;
border: 1px solid black;
background-color: yellow;
outline: 4px solid red;
outline-offset: 15px;
}
div.ex2 {
margin: 10px;
border: 1px solid black;
background-color: yellow;
outline: 5px dashed blue;
outline-offset: 5px;
}
</style>
</head>
<body>
<h1>The outline-offset Property</h1>
<div class="ex1">This div has a 4 pixels solid red outline 15 pixels outside the border edge.</div>
<br>
<div class="ex2">This div has a 5 pixels dashed blue outline 5 pixels outside the border edge.</div>
</body>
</html>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.