TVL-COMPROG11-Q2-M1
TVL-COMPROG11-Q2-M1
Technical Vocational
Livelihood
QUARTER
2 Computer Programming
Republic Act 8293, section 176 states that: No copyright shall subsist in
any work of the Government of the Philippines. However, prior approval of the
government agency or office wherein the work is created shall be necessary for
exploitation of such work for profit. Such agency or office may, among other things,
impose as a condition the payment of royalties.
Quarter 2
Self Learning Module 1
CSS Background, Color,
Gradients and Shadow
Welcome to the Computer Programming for the ICT Module on CSS Background,
Color, Gradients and Shadow!
This module was collaboratively designed, developed and reviewed by educators from
Schools Division Office of Pasig City headed by its Officer-In-Charge Schools Division
Superintendent, Ma. Evalou Concepcion A. Agustin in partnership with the Local
Government of Pasig through its mayor, Honorable Victor Ma. Regis N. Sotto.
The writers utilized the standards set by the K to 12 Curriculum using the Most
Essential Learning Competencies (MELC) while overcoming their personal, social,
and economic constraints in schooling.
This learning material hopes to engage the learners into guided and independent
learning activities at their own pace and time. Further, this also aims to help learners
acquire the needed 21st century skills especially the 5 Cs namely: Communication,
Collaboration, Creativity, Critical Thinking and Character while taking into
consideration their needs and circumstances.
In addition to the material in the main text, you will also see this box in the body of
the module:
As a facilitator you are expected to orient the learners on how to use this module.
You also need to keep track of the learners' progress while allowing them to manage
their own learning. Moreover, you are expected to encourage and assist the learners
as they do the tasks included in the module.
For the Learner:
Welcome to the Computer Programming for the ICT Module on CSS Background,
Color, Gradients and Shadow!
The hand is one of the most symbolized part of the human body. It is often used to
depict skill, action and purpose. Through our hands we may learn, create and
accomplish. Hence, the hand in this learning resource signifies that you as a learner
is capable and empowered to successfully achieve the relevant competencies and
skills at your own pace and time. Your academic success lies in your own hands!
This module was designed to provide you with fun and meaningful opportunities for
guided and independent learning at your own pace and time. You will be enabled to
process the contents of the learning material while being an active learner.
Lesson- This section will discuss the topic for this module.
Post-test - This will measure how much you have learned from
the entire module. Ito po ang parts ng module.
EXPECTATION
PRE–TEST
A. Repeating a linear-gradient
B. Radial Gradient - Differently Spaced Color Stops
C. Repeating a radial-gradient
D. Linear Gradient - Left to Right
A. Repeating a linear-gradient
B. Radial Gradient - Differently Spaced Color Stops
C. Repeating a radial-gradient
D. Linear Gradient - Left to Right
RECAP
Quarter 1 Module 18 defined opacity, differentiated horizontal and
vertical navigation bar and discussed how to make a tooltip. In your own
words describe the following terms:
• CSS Opacity
• CSS Navigation Bar
• CSS Tooltip
LESSON
CSS Backgrounds
CSS backgrounds allow the user to add multiple background images to one
element and it allow greater control of the background element. Take note that not
all browser can support CSS background and its properties.
Output:
Contain resize the background image, both its width and its height must fit
inside the content area, depending on the proportions of the background image and
the background positioning area.
Cover resize the background image so that the content area is completely
covered by the background image, both its width and height are equal to or exceed
the content area.
Example:
Output:
CSS Color
CSS supports color names, hexadecimal and RGB colors.
In addition, CSS also introduces:
• RGBA colors - rgba(red, green, blue, alpha)
• HSL colors - hsl(hue, saturation, lightness)
• HSLA colors - hsla(hue, saturation, lightness, alpha)
• Opacity – transparent to opaque
Example: (try changing the values with your PC to see what happens)
rgba(255, 0, 0, 0.2);
hsl(0, 100%, 30%);
hsla(0, 100%, 30%, 0.3);
rgb(255, 0, 0);opacity:0.2;
CSS Gradients
Gradients allows us to display transitions between two or more specified
colors.
Two types of gradients:
• Linear Gradients (to bottom, to top, to right, to left, to bottom right, etc.)
• Radial Gradients (defined by their center)
Linear Gradients
In creating a linear gradient, you must define at least two-color stops. Color
stops are the colors you want to render for the smooth transitions.
Syntax:
background: linear-gradient (direction, color-stop1, color-stop2, ...,);
Example: (try changing the values with your PC to see what happens)
# gradient {
background: linear-gradient (to right, red , yellow); }
Output:
Using Angles
Syntax:
background: linear-gradient (angle, color-stop1, color-stop2);
Example: (try changing the values with your PC to see what happens)
# gradient {
background: linear-gradient (-90deg, red, yellow); }
Output:
Repeating a linear-gradient
Repeating-linear-gradient() function is used to repeat linear gradients.
Example: (try changing the values with your PC to see what happens)
# gradient {
background: repeating-linear-gradient(red, yellow 10%, green 20%);}
Output:
text-shadow
box-shadow
Create a webpage about your own understanding of the lesson and apply
the use of CSS background, gradients, color and shadow.
Rubrics:
Total /100
*Answer the Worksheet number 1 and submit a soft copy/hard copy of your
completed activity to your subject teacher on the following meeting.
WRAP–UP
• background-clip
• background-image
• background-origin
• background-size
• Linear Gradients
• Radial Gradients
• Box-shadow
• Text-shadow
VALUING
2. How will you use the knowledge you acquired in this module?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
POST TEST
Instructions: Select the letter that corresponds to the correct answer.
1. ____________ resize the background image, both its width and its height
must fit inside the content area,
A. contain
B. cover
C. repeat
D. no-repeat
2. ______________resize the background image so that the content area is
completely covered by the background image
A. contain
B. cover
C. repeat
D. no-repeat
KEY TO CORRECTION
A 5. B 5.
B 4. A 4.
C 3. B 3.
B 2. B 2.
D 1. A 1.
Pre-test: Post-test:
REFERENCES
• Accessed August 26, 2020 11:30Am https://www.w3schools.com
• Accessed August 26, 2020 12:00nn https://www.tutorialrepublic.com