Ankith Reddy has Published 996 Articles

Usage of :hover pseudo-class in CSS

Ankith Reddy

Ankith Reddy

Updated on 04-Mar-2020 12:45:06

114 Views

The :hover pseudo class is used to add special style to an element when you mouse over it. Possible values could be any color name in any valid format.Example                    a:hover {             color: #FFCC00          }                     Bring Mouse Here    

Create layers using CSS

Ankith Reddy

Ankith Reddy

Updated on 04-Mar-2020 12:17:03

73 Views

To create layers using CSS, you can try to run the following code. I have used the the z-index propertyExample                                                    

Set outline style as ridge with CSS

Ankith Reddy

Ankith Reddy

Updated on 04-Mar-2020 11:28:16

199 Views

To set the outline style as ridge, use the outline-style property with the value ridge. Under groove, the outline looks as though it is carved into the page. The ridge value is the opposite. Example                            This text is having 3px ridge outline.          

Set the color of the outline with CSS

Ankith Reddy

Ankith Reddy

Updated on 04-Mar-2020 11:25:51

93 Views

The outline-color property allows you to specify the color of the outline. Its value should either be a color name, a hex color, or an RGB value, as with the color and border-color properties.ExampleYou can try to run the following code to implement outline-color property −         ... Read More

HTML5 semantic elements and which old browsers does it support?

Ankith Reddy

Ankith Reddy

Updated on 04-Mar-2020 06:19:30

281 Views

Internet Explorer 8 and older versions does not support semantic elements like nav, header and article. To style semantic elements, Modernizer is used. Some CSS can be added to block CSS by default.article, header, nav, section, footer {    display:block; }We can also create our own elements through JavaScript by ... Read More

How to get materialize CSS checkbox to work with @Html.CheckBoxFor?

Ankith Reddy

Ankith Reddy

Updated on 04-Mar-2020 06:08:57

209 Views

The only way to materialize CSS checkbox to work with Html.checkbox without disappearance of the checkbox to the left is by moving the hidden element to the bottom of the parent element.$("input[type='hidden']").each(checkbox1 (0, IsActive ) {    $(this).appendTo($(IsActive).parent()); });In this hidden element, IsActive is placed in the bottom of parent ... Read More

How do I add a simple onClick event handler to an HTML5 canvas element?

Ankith Reddy

Ankith Reddy

Updated on 04-Mar-2020 04:46:50

5K+ Views

The elements that are drawn in canvas element have no representation. Their only representation is the pixels they use and their color. Drawing to a canvas element means drawing a bitmap in immediate mode. To get a click event on a canvas element (shape), you need to capture click events ... Read More

How to set the range that is considered to be of high value in HTML?

Ankith Reddy

Ankith Reddy

Updated on 03-Mar-2020 09:56:18

106 Views

Use the high attribute in HTML to set the range that is considered to be of high value in HTML.ExampleYou can try to run the following code to implement the high attribute −                    Water Level:                    

Execute a script when the user writes something in a search field in HTML?

Ankith Reddy

Ankith Reddy

Updated on 03-Mar-2020 09:37:13

199 Views

Use the onsearch attribute in HTML to execute a script when the user writes in a search field and press ENTER or x.ExampleYou can try to run the following code to implement the onsearch attribute −           Search something and press ENTER.       ... Read More

Execute a script as long as the mouse pointer is moving over an element in HTML?

Ankith Reddy

Ankith Reddy

Updated on 03-Mar-2020 07:29:12

146 Views

When the mouse pointer is moving over an element, the onmousemove attribute triggers. You can try to the following code to implement onmousemove attribute −Example                    This is demo heading.            Click above and then release.               function mouseMove() {         document.getElementById("myid").style.color = "red";         }          

Advertisements