Showing posts with label css tricks. Show all posts
Showing posts with label css tricks. Show all posts

Friday, February 14, 2020

CSS Media Queries for All Devices and Browsers (Including IE7 and IE8)

Hello

Here I display all type of css media queries for all devices and browsers. Use either alone 1 or use both 2,3. Same as you have to use  portrait and landscape.

1:
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* STYLES GO HERE */
}
 
2: 
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
/* STYLES GO HERE */
}
 
3: 
/* Smartphones (portrait) ----------- */
@media only screen
and (max-width : 320px) {
/* STYLES GO HERE */
}
 
4:
 /* iPads (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
/* STYLES GO HERE */
} 
 
5: 
 /* iPads (landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
/* STYLES GO HERE */
} 
 
6: 
/* iPads (portrait) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
/* STYLES GO HERE */
} 
 
7:
 /* Desktops and laptops ----------- */
@media only screen
and (min-width : 1224px) {
/* STYLES GO HERE */
} 
 
8: 
 /* Large screens ----------- */
@media only screen
and (min-width : 1824px) {
/* STYLES GO HERE */
}
 
9:
 /* iPhone 5 (portrait & landscape)----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px) {
/* STYLES GO HERE */
} 
 
10: 
 /* iPhone 5 (landscape)----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : landscape) {
/* STYLES GO HERE */
}
 
11:
 /* iPhone 5 (portrait)----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : portrait) {
/* STYLES GO HERE */
}

Tuesday, January 31, 2017

Awesome Tooltips with Pure CSS Using Hint.css

Today I am going to introduce a awesome plugin Hint.css, A pure CSS tooltip library for your lovely websites. It is easy to use and very light weight and no javascript you can purely manage this tooptip in css, Hint.css is a tooltip library in CSS that helps you add cool tooltips to any element of your page. The major difference between Hint.css and othe tooltip plugins is that Hint.css uses data-* attribute, pseudo elements, content property and CSS3 transitions so that it’s only compatible with those modern browsers which fully support HTML5 and CSS3.

Step.1- Include hint.css in your page.
<link rel="stylesheet" href="hint.min.css">
 
Step.2-   Use class hint Now, all you need to do is give your element any position class and tooltip text using the aria-label or data-hint attribute:

Hello Sir, <span class="hint--bottom"  aria-label="Thank you!" style="color:red">hover over me.
 
You can choose position like hint–bottom, hint–top, hint–left, hint–right

Also Use it with other available modifiers in various combinations. 
Available modifiers: hint–error, hint–info, hint–warning, hint–success, 
hint–rounded and hint–bounce.