CSS Order Property

Lakshmi Srinivas
Updated on 25-Jun-2020 07:23:28

102 Views

Use the order property to set the order of the flex itemsYou can try to run the following code to implement the CSS order property −ExampleLive Demo                    .mycontainer {             display: flex;             background-color: orange;             align-content: space-between;             height: 150px;             width: 600px;             flex-wrap: wrap;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                  Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          

NavigableMap Clear Method in Java

karthikeya Boyini
Updated on 25-Jun-2020 07:23:12

145 Views

Clear the NavigableMap in Java, using the clear() method.Let us first create a NavigableMap and add some elements to it −NavigableMap n = new TreeMap(); n.put(5, "Tom"); n.put(9, "John"); n.put(14, "Jamie"); n.put(1, "Tim"); n.put(4, "Jackie"); n.put(15, "Kurt"); n.put(19, "Tiger"); n.put(24, "Jacob");Now, use the clear() method −n.clear();The following is an example to implement clear() method and clear the NavigableMap −Example Live Demoimport java.util.*; public class Demo {    public static void main(String[] args) {       NavigableMap n = new TreeMap();       n.put(5, "Tom");       n.put(9, "John");       n.put(14, "Jamie");       n.put(1, "Tim"); ... Read More

Convert Coordinates to a Place Name with HTML5

Anvi Jain
Updated on 25-Jun-2020 07:22:53

322 Views

For this, use Google Maps API to perform reverse geocoding.Geocoding refers to translating a human-readable address into a location on a map.The process of doing the converse, translating a location on the map into a human-readable address, is known as reverse geocoding.ExampleLet us see an example to set latitude and longitude −function initMap() {    var map = new google.maps.Map(document.getElementById('map'), {       zoom: 8,       center: {lat: 20.502, lng: -22.765}    }); }The reverse geocoder will match countries, provinces, cities and neighborhoods, street addresses, and postal codes.

Perform Animation on CSS clip Property

Arjun Thakur
Updated on 25-Jun-2020 07:22:35

175 Views

To implement animation on clip property with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 200px;             height: 300px;             background: yellow;             border: 10px solid red;             animation: myanim 3s infinite;             bottom: 30px;             position: absolute;             clip: rect(0,100px,50px,0);          }          @keyframes myanim {             20% {                bottom: 100px;                clip: rect(0,150px,40px,0);             }          }                     Performing Animation on clip property          

NavigableMap isEmpty Method in Java

Samual Sam
Updated on 25-Jun-2020 07:22:15

136 Views

Check whether a Map is empty or not using the isEmpty() method.Let us first create a NavigableMap and add some elements to it −NavigableMap n = new TreeMap(); n.put(5, "Tom"); n.put(9, "John"); n.put(14, "Jamie"); n.put(1, "Tim"); n.put(4, "Jackie"); n.put(15, "Kurt"); n.put(19, "Tiger"); n.put(24, "Jacob");Now, use the following method to check whether the Map is empty or not. Since we added some elements above, therefore the Map is not empty −n. isEmpty();The following is an example to implement isEmpty() method −Example Live Demoimport java.util.*; public class Demo {    public static void main(String[] args) {       NavigableMap n = new ... Read More

Animate Box Shadow CSS Property

karthikeya Boyini
Updated on 25-Jun-2020 07:21:46

1K+ Views

To implement animation on box-shadow property with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 200px;             height: 300px;             background: yellow;             border: 10px solid red;             animation: myanim 3s infinite;             bottom: 30px;             position: absolute;          }          @keyframes myanim {             20% {                bottom: 100px;                box-shadow: 30px 45px 70px orange;             }          }                     Performing Animation on box-shadow          

Count Elements in a HashSet in Java

karthikeya Boyini
Updated on 25-Jun-2020 07:21:19

4K+ Views

To count the number of elements in a HashSet, use the size() method.Create HashSet −String strArr[] = { "P", "Q", "R" }; Set s = new HashSet(Arrays.asList(strArr));Let us now count the number of elements in the above Set −s.size()The following is an example to count the number of elements in a HashSet −Example Live Demoimport java.util.Arrays; import java.util.HashSet; import java.util.Set; public class Demo {    public static void main(String[] a) {       String strArr[] = { "P", "Q", "R" };       Set s = new HashSet(Arrays.asList(strArr));       System.out.println("Elements: "+s);       System.out.println("Number of Elements: ... Read More

Translating HTML5 Canvas

Nishtha Thakur
Updated on 25-Jun-2020 07:20:55

437 Views

Use the translate() method to translate canvas. HTML5 canvas provides a translate(x, y) method which is used to move the canvas and its origin to a different point in the grid.Here argument x is the amount the canvas is moved to the left or right, and y is the amount it's moved up or downExample                    #test {             width:100px;             height:100px;             margin:0px auto;          }         ... Read More

CSS Styling for Chrome Input Type Number

Lakshmi Srinivas
Updated on 25-Jun-2020 07:20:05

1K+ Views

To style input type = number, use the following CSS −input[type=number]::-webkit-inner-spin-button {    -webkit-appearance: none; }The above shows without a spinner.To show and style a spinner, useinput[type=number]::-webkit-inner-spin-button {    opacity: 1; }OutputThe above shows the following output −

Detect Click-to-Call Support in JavaScript

Ankith Reddy
Updated on 25-Jun-2020 07:19:05

264 Views

The tel: protocol is supported by almost every mobile device nowadays. This includes Safari on iOS, Android Browser, Symbian browser, Opera Mini, etc.Add it like this −if (/(HTC825)/i.test(navigator.userAgent)){    $("a[href^='tel:']").each(function(){       this.href = this.href.replace("tel:", "wtai://wp/mc;");    }); }

Advertisements