- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1566 Articles for CSS
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
145 Views
The pseudo-class keywords are used to specify a special state of the selector to which it is added. This gives us more control and now we can target a selector when it is in specific state for e.g.: hover, checked, visited etc. Pseudo-classes The following are some key Pseudo-classes − :active = To select the active link :checked = To select every checked element :first-child = To select the first child of an element’s parent :first-of-type = To select the first element of its parent :focus = To select the element that has focus :hover = To select ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
130 Views
To specify word breaking rules in CSS3, use the word-break property. This property is used to break the line. Let us see the syntax − word-break: value; The values include normal − The default line break rules. break-all − The word is broken at any character only if overflow occurs break-word − The word is broken at arbitrary-points to prevent overflow The following are the codes for specifying word breaking rules using CSS3 − Normal Word Breaking Rule The normal word breaking rule is the default rule − word-break: normal; Example Let us ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
507 Views
The Advanced Selectors in CSS includes Adjacent Sibling selector, attribute selector, direct child selector, nth-of-type selector, etc. It also includes General Sibling Selector, an example is shown below:h1 ~ h3Example of direct child selector −div > spanFollowing is the code showing advanced selectors in CSS −Example Live Demo #red { color: red; } .green { background: green; } ul:nth-of-type(1) { background: rgb(0, 174, 255); } ul + h3 { border: 4px solid rgb(19, 0, 128); } a[href="https://www.wikipedia.org"] { font-size: 25px; } h1 ~ h3 { font-size: 40px; } div > span { ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
201 Views
The property opacity is the ultimate and modern solution and works for Firefox 0.9+, Safari 2, opera 9+, IE 9+ and every version of Google Chrome. The -moz-opacity property is the opacity property for Firefox versions older than 0.9 while the –khtml-opacity property is for safari versions starting with 1. The filter property is for IE browsers from 5 to 9 to give opacity like effect.Following is code for image opacity using CSS for all browsers −Example Live Demo body{ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } img { width:270px; height:200px; } .transparent{ ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
123 Views
The text-overflow property is used in CSS3 to determine how overflowed content that is not displayed is signalled to users. Syntax The following is the syntax of the text-overflow property − text-overflow: value; The value can be clip, ellipsis, string, and initial. You can set any text using the string value. The ("...") t is shown for the clipped text when the ellipsis value is used. The following is the code for handling text overflow in CSS3 − Clip the Text In this example, the overflow text is clipped and cannot be accessed using the text-overflow property with ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
932 Views
To set the size of the radial gradient, use the radial-gradient() function. This function sets a radial gradient as the background image. The second parameter in the function is to be set as the size you want as in the below example − background-image: radial-gradient(40% 50px at center, rgb(30, 255, 0), rgb(0, 195, 255), rgb(128, 0, 32)); Possible values are farthest-corner (default), closest-side, closest-corner, and farthest-side. Following is the code for setting the size of the radial gradients using CSS. Let us first see the complete syntax of the radial gradient. Syntax The following is the syntax of ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
115 Views
To create CSS3 Transition Effects, use the transition property. Following is the code for creating transition effects using CSS3 −Example Live Demo .container div { width: 300px; height: 100px; background: rgb(25, 0, 255); border: 2px solid red; transition: width 2s; } .container:hover div { width: 100px; } Transition effects example Hover over the above div to reduce its width OutputThe above code will produce the following output −On hovering above the div −
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
113 Views
Using with 3d transforms, we can move element to x-axis, y-axis and z-axis. The following are some of the methods of CSS3 3D Transform − S.No. Value & Description 1 matrix3d(n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n)Used to transforms the element by using 16 values of matrix 2 translate3d(x, y, z)Used to transforms the element by using x-axis, y-axis and z-axis 3 translateX(x)Used to transforms the element by using x-axis 4 translateY(y)Used to transforms the element by using y-axis ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
234 Views
A paragraph can be bordered easily on a web page with HTML and CSS. With that, to border the paragraph, we can also use an image. To create border images in CSS, use the border-image property. The following is the syntax of the border-image property − Syntax border-image: value; The value can be − border-image-source − The source of the image to be set as border border-image-slice − Slice the border image. The image is slice in the following sections− four corners, four edges and the middle. border-image-width − width of the border image border-image-outset − ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
180 Views
The rounded corner of an element is set on a web page using the border-radius property in CSS3. You can set the shape of the rounded corners with − length − Set shape of the corners in length units. Default is 0. Read about length units % − Set the shape in percentage Let us see two examples to set rounded corners for a container and an image. Create rounded corners We have two divs here to show the difference between a normal and a container with rounded corners − Rounded Corners Default corners Example The ... Read More