--> 5 Cool CSS Tricks To Spice Up Your Website | Experience Lab - Online business creation and development guide for bloggers and startups

5 Cool CSS Tricks To Spice Up Your Website

CSS is a basic part of any webpage, and is what gives the page its distinctive look. CSS can be simple yet complicated at the same time, fro...



CSS tricks

CSS is a basic part of any webpage, and is what gives the page its distinctive look. CSS can be simple yet complicated at the same time, from a simple typography rule to a complex animation. It can be used to create amazing things. Today, we'll share some CSS styles which you might useful, and may use on your website to spice things up a bit.


1. Blurry text



Blurry text has a certain appeal, and is often used to direct attention towards a specific piece of text. Not to mention it looks cool :) Here's the CSS for making some text blurry. The trick is to fist make the text transparent, then add a drop shadow like so;



.blurry-text {


   color: transparent;


   text-shadow: 0 0 5px rgba(0,0,0,0.5);


}



Here's a sample text that is really blurry.


2. Animated gradient




Sounds cool, right? Well it is. Strictly speaking, you cannot animate a gradient color unlike some of the other CSS properties. You can, however, move the background around to make it look like it's animated.





button {


    background-image: linear-gradient(#518712, #124555);


    background-size: auto 200%;


    background-position: 0 100%;


    transition: background-position 0.5s;


}


button:hover {


    background-position: 0 0;


}




3. Image Grayscale




Grayscale tones up an image and makes it look classy and cool. You can apply an SVG filter to an image to turn it into grayscale.





<svg xmlns="http://www.w3.org/2000/svg">


    <filter id="grayscale">


        <feColorMatrix type="matrix" values="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"/>


    </filter>


</svg>




img {


    filter: url(filters.svg#grayscale); /* Firefox 3.5+ */


    filter: gray; /* IE6-9 */


    -webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */







4. Customizing link types





You can use CSS to customize how different types of links appear based on their file formats. You can set http:// links to appear a certain way, and mailto: and .pdf files to appear another. Here's the CSS;



a[href^="http://"]{


    padding-right: 20px;


    background: url(external.gif) no-repeat center right;


}


/* emails */


a[href^="mailto:"]{


    padding-right: 20px;


    background: url(email.png) no-repeat center right;


}


/* PDFs */


a[href$=".pdf"]{


    padding-right: 20px;


    background: url(pdf.png) no-repeat center right;


}



5. Vertical alignment




Vertically aligning something can be a real pain. There's no simple property you can apply to everything. Here is, however, a CSS3 transform style which you can use to vertically align anything.




.verticalcenter {


    position: relative;


    top: 50%;


    -webkit-transform: translateY(-50%);


    -o-transform: translateY(-50%);


    transform: translateY(-50%);


}




Got any more cool CSS tricks you want to share with us? Let us know in the comments section below! Cheers :)

COMMENTS

Name

Affiliate Marketing,12,Announcement,34,Bing,9,Bitcoin,38,blog,7,Blogger Resources,42,Blogger Templates,4,blogger tricks,156,Blogging ethics,70,Blogging tips,198,Bugs and Errors,34,Business,9,Copyright Violation,9,CSS and HTMLTricks,95,Designs,8,drop down menu,7,eBook,12,Email Marketing,7,Events,30,Facebook,30,Facebook tricks,49,Google,157,Google AdSense,42,Google Analytics,7,Google Plus,51,Google Plus Tricks,38,Guest Posts,112,home,2,How To,77,Internet,1,JSON Feeds,25,Kitchen Recipes,2,Label Based Sitemap Themes,1,Make Money Online,108,Marketing,16,MBT Blogger Templates,7,Menus,1,News,146,Pages,1,Posts,10,presentations,15,Responsive,10,Reviews,7,SEO,307,Settings,6,Shortcode,15,Sitemap Themes,1,Social Media,155,Technology,7,Templates,1,Tips,2,Tools,1,Traffic Tips,80,Video,19,Web Designing,62,web hosting,18,Webmaster Tools,97,Widgets,199,wordpress,26,
ltr
item
Experience Lab - Online business creation and development guide for bloggers and startups: 5 Cool CSS Tricks To Spice Up Your Website
5 Cool CSS Tricks To Spice Up Your Website
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8OD_v02SYYh2xAI4vcgNVJn48uixhZ4T9QsoYgq0JTrQLYa8neBI4ajEMKj7URrMPMSHJtSacf3NzFZeyRiwUAEnKc748B6BQzybTBfi3cPe1hq7ODS7AiLLMXTJ4cgonKgm-pzcUmDGX/s1600/css.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8OD_v02SYYh2xAI4vcgNVJn48uixhZ4T9QsoYgq0JTrQLYa8neBI4ajEMKj7URrMPMSHJtSacf3NzFZeyRiwUAEnKc748B6BQzybTBfi3cPe1hq7ODS7AiLLMXTJ4cgonKgm-pzcUmDGX/s72-c/css.png
Experience Lab - Online business creation and development guide for bloggers and startups
https://www.experiencelab.info/2014/12/5-cool-css-tricks-to-spice-up-your.html
https://www.experiencelab.info/
https://www.experiencelab.info/
https://www.experiencelab.info/2014/12/5-cool-css-tricks-to-spice-up-your.html
true
2959477579779989044
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy