Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial CSS3 compilation
#1
Short & easy set of tutorials that might help you to get most of CSS3.


TRANSPARENCY

#1 Here .6 represents 60% opacity (40% transparent)
CSS Code
  1. .example {
  2. opacity: .6;
  3. }


#2 Here rgba stands for Red-Green-Blue-Alpha, and the last option is what we need
CSS Code
  1. .example {
  2. background-color: rgba(255, 96, 0, 0.6);
  3. }


#3 We can use hsla as well (Hue-Saturation-Lightness-Alpha)
CSS Code
  1. .example {
  2. background-color: hsla(23, 100%, 50%, 0.6);
  3. }


ROUNDING CORNERS
CSS Code
  1. .example {
  2. border-radius: Xpx;
  3. }

Where X is your number of pixels

SHADOWS
#1 Drop shadow on text (h3 will be used as example). #999 is colour code (light grey currently). Next two pixel values are horizontal and vertical offsets and last one is blur.
CSS Code
  1. h3 {
  2. text-shadow: #999 2px 2px 4px;
  3. }


#2 Drop shadow on content (box). Everything is the same as in text shadow, but the last value is added, which is spread distance.
CSS Code
  1. .example {
  2. box-shadow: #999 2px 2px 20px 5px;
  3. }


SOME SIMPLE TEXT EFFECTS
#1 3D TEXT
CSS Code
  1. h3 {
  2. color: #ff80000;
  3. text-shadow: #ff5500 1px -1px 0,
  4. #ff5500 2px -2px 0,
  5. #ff5500 3px -3px 0,
  6. #ff5500 4px -4px 0,
  7. #ff5500 5px -5px 0,
  8. #ff5500 6px -6px 0,
  9. #ff5500 7px -7px 0,
  10. #ff5500 8px -8px 0,
  11. #ff5500 9px -9px 0,
  12. #ff5500 10px -10px 0;
  13. }


#2 ANAGLYPHIC TEXT (You may have to adjust some settings yourself, it is not the same for all text). All should be changed to your value. The code is very adjustable, you can edit it up to your taste easily. However, these settings work best for me
CSS Code
  1. h3 {
  2. position: relative;
  3. font-size: px;
  4. font-family: sans-serif;
  5. letter-spacing: -5px;
  6. color: rgba(0, 0, 255, 0.5)
  7. }
  8.  
  9. h3:after {
  10. content: "Your Text";
  11. position: absolute;
  12. left: px;
  13. top: px;
  14. color: rgba(255, 0, 0, 0.5);
  15. }


GRADIENTS
Simple nice-looking gradient. For better ones you can use http://colorzilla.com/gradient-editor/

#1 Linear gradient. Top is origin, color at origin, percentage of page, color at end, percentage.
CSS Code
  1. html {
  2. background-image: linear-gradient(top, #000000 20%, #ffffff 80%);
  3. }


#2 Radial gradient.
CSS Code
  1. html {
  2. background-image: radial-gradient(center center, circle contain, #ffffff 0%, #000000 100%);
  3. }


#3 You can have small problem - the gradient added that way may be not covering whole page, but around 80% and another 20% will be same gradient but repeated again, which does not look nice. To prevent this happening simply add
CSS Code
  1. html {min-height: 100%}
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Funny MW3 screenshots compilation kokole 2 3,403 07-26-2012, 19:59
Last Post: Yamato
Music [Release] CVD productions - Melody Compilation Xzite 3 2,208 11-18-2011, 16:51
Last Post: Nekochan
  [News] Steam Fake Site spreaders compilation d0h! 8 5,547 01-18-2011, 14:22
Last Post: AZUMIKKEL
  [Tutorial] [MASSIVE] Call Of Duty : Black OPS Game Cheat Codes and Game Guides Compilation aosma8 6 12,588 12-16-2010, 08:09
Last Post: Pozzuh

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.