Web design: css3 gradient, part II: code
Continuing with css3 gradients, the tutor shows some coding examples.
In my previous post I began about css3 gradients, showing a few examples. Today, I show the code I used to generate them.
Left to right, red to blue:
<div style="background: linear-gradient(to right,#ff9999, #9999ff); font-size:20px; font-family:monospace; text-align:center">


Top left to bottom right, red to blue:
<div style="background: linear-gradient(to bottom right, #ff9999, #9999ff); font-size:20px; font-family:monospace; text-align:center">


Left to right, red to white to blue:
<div style="background:linear-gradient(to right, #ff9999, #ffffff, #9999ff); font-size:20px; font-family:monospace; text-align:center">


Next post I’ll comment on browser support for the effects above:)
Source:
Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.
Leave a Reply
You must be logged in to post a comment.