Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles by Chandu yadav
Page 17 of 81
Display a blue shadow on image hover with CSS
To display a shadow on image hover, use the CSS box-shadow propertyExample img { border: 2px solid orange; border-radius: 3px; padding: 7px; } img:hover { box-shadow: 0 0 2px 2px blue; }
Read MoreModular multiplicative inverse in java
The java.math.BigInteger.modInverse(BigInteger m) returns a BigInteger whose value is (this-1 mod m). Using this method you can calculate Modular multiplicative inverse for a given number.Programimport java.math.*; public class BigIntegerDemo { public static void main(String[] args) { // create 3 BigInteger objects BigInteger bi1, bi2, bi3; // create a BigInteger exponent BigInteger exponent = new BigInteger("2"); bi1 = new BigInteger("7"); bi2 = new BigInteger("20"); // perform modPow operation on bi1 using bi2 and exp bi3 = bi1.modPow(exponent, bi2); String str = bi1 + "^" +exponent+ " mod " + bi2 + " is " +bi3; // print bi3 value System.out.println( str ); } }Output7^2 mod 20 is 9
Read MoreSet the color of the four borders using CSS
To set the color of the four borders, use the border-color property. You can try to run the following code to set border color for all the bordersExample p { border-style: dashed; border-color: #808000 #800000 #FF0000 #FFFF00; } This is demo text with four colored border. Output
Read MoreChange the background color of a button with CSS
To change the background color of a button, use the background-color property.You can try to run the following code to change button’s background colorExample .btn { background-color: yellow; color: black; text-align: center; font-size: 13px; } Result Click below for result: Result
Read MoreCreate a Bordered Button Group with CSS
You can try to run the following code to create a bordered button group with border propertyExample .btn { color: black; background-color: yellow; width: 120px; text-align: center; font-size: 15px; padding: 20px; float: left; border: 3px solid blue; } .mybtn { background-color: orange; } Result Click below for result: Result Result Result Result Result
Read MoreCSS position: relative;
The position: relative; property allows you to position element relative to its normal position. You can try to run the following code to implement CSS position: relative;Example div { position: relative; left: 20px; border: 3px solid blue; } Positioning Element div element with position: relative; Output
Read MoreCreate a responsive pagination with CSS
You can try to run the following code to create a responsive pagination with CSSExample .demo { display: inline-block; } .demo a { color: blue; float: left; padding: 3px 8px; text-decoration: none; } Our Quizzes
Read MoreCSS overflow-x
The CSS overflow-x allows you to decide what to do with the left right edges of the content.ExampleYou can try to run the following code to implement the overflow-x property div { background-color: orange; width: 250px; height: 45px; border: 2px solid blue; overflow-x: hidden; overflow-y: scroll; } Heading Overflow property used here. This is a demo text to show the working of CSS overflow-x and overflow-y. Output
Read MoreCSS Child Selector
Use the child selector, if you want to select all elements immediate children of a specified element.div > pExampleYou can try to run the following code to implement CSS Child Selector div > p { background-color: orange; } Para 1 in the div. Para 2 in the div. Para 3 outside the div. Output
Read MoreRole of CSS: disabled Selector
Use the CSS :disabled selector to style every disabled element. You can try to run the following code to implement the :disabled selectorExample input:enabled { background: blue; } input:disabled { background: red; } Subject Student: Age:
Read More