AmitDiwan has Published 10740 Articles

HTML DOM Video volume Property

AmitDiwan

AmitDiwan

Updated on 15-Feb-2021 04:49:31

121 Views

The HTML DOM Video volume property returns/sets a number corresponding to current volume level of media.SyntaxFollowing is the syntax −Returning volume as a numbermediaObject.volumeSetting volume to a numbermediaObject.volume = numberNOTE: Number has a max value of ’1.0’ and if ‘0.0’ video volume is min.Let us see an example of Video ... Read More

HTML DOM Video width Property

AmitDiwan

AmitDiwan

Updated on 15-Feb-2021 04:46:52

148 Views

The HTML DOM Video width property returns/sets a number corresponding to width (in pixels) of media.SyntaxFollowing is the syntax −Returning width as a number (px)mediaObject.widthSetting width to a number (px)mediaObject.width = numberLet us see an example of Video width property −Example Live Demo HTML DOM Video width   ... Read More

HTML DOM localStorage Properties

AmitDiwan

AmitDiwan

Updated on 15-Feb-2021 04:38:59

257 Views

The HTML DOM localStorage Properties enables user to store key-value pairs in local browser itself for future reference. Key-value pairs are not lost until explicitly removed/cleared.SyntaxFollowing is the syntax −Window.localStorageHere, localStorage can have following properties/methods −setItem(‘key’, ’value’)getItem(‘key’)removeItem(‘key’)Let us see an example of localStorage properties −Example Live Demo LocalStorage clear() ... Read More

HTML DOM Window stop() Method

AmitDiwan

AmitDiwan

Updated on 15-Feb-2021 04:37:58

286 Views

The HTML DOM Window stop() provides user the functionality to stop loading the resources of a window without clicking the browser stop button.SyntaxFollowing is the syntax −window.stop()ExampleLet us see an example of HTML DOM Window stop() method − HTML DOM Window stop()    * {     ... Read More

How to Create a Dark / Light Mode for Websites using CSS

AmitDiwan

AmitDiwan

Updated on 10-Feb-2021 13:59:59

817 Views

By changing the text-color and background color of a page, we can add dark/light mode for our website.SyntaxThe following syntax can be used to apply dark mode.Selector {    color: white;    background-color: black }Example Live Demo                    div {   ... Read More

How to Create a Black and White Image Using CSS

AmitDiwan

AmitDiwan

Updated on 10-Feb-2021 13:42:30

9K+ Views

By specifying grayscale value to the filter property of CSS we can create a black and white image. filter property can be used to apply special effects like blur, drop-shadow to images.SyntaxThe syntax of CSS filter property is as follows −Selector {    filter: grayscale(100%);    -webkit-filter: grayscale(100%); }ExampleThe following ... Read More

Creating a Responsive Logo with CSS min() Function (No Media Query Involved)

AmitDiwan

AmitDiwan

Updated on 10-Feb-2021 13:29:11

322 Views

Using the CSS min() function, we can create a responsive logo in our webpages. It allows us to specify a minimum value to a CSS attribute.SyntaxThe syntax of CSS min() property is as follows −Selector {    attribute: min(/*value*/, /*value*/); }ExampleThe following examples illustrate CSS min() property. Live Demo   ... Read More

Creating a Slider / Carousel with CSS Flexbox (with infinite repeating items in loop)

AmitDiwan

AmitDiwan

Updated on 10-Feb-2021 13:23:13

2K+ Views

We can create an infinitely scrolling slider using CSS Flexbox with the help of JavaScript.ExampleThe following examples illustrate carousel using CSS. Live Demo                    img {             width: 100%;          }     ... Read More

How to Create a Comment Box with a Containing Text Using CSS

AmitDiwan

AmitDiwan

Updated on 10-Feb-2021 13:05:31

657 Views

Comment box can be created using clip-path propertySyntaxThe syntax of CSS clip-path property is as follows −Selector {    clip-path: /*value*/ }ExampleThe following examples show how we can create a comment box using CSS. Live Demo                    .cb {     ... Read More

Counting How Many Numbers Are Smaller Than the Current Number in JavaScript

AmitDiwan

AmitDiwan

Updated on 27-Jan-2021 06:35:15

291 Views

We are required to write a JavaScript function that takes in an array of Numbers.The function should construct a new array based on the input array.Each corresponding element of the new array should be the number of elements that are smaller in the original array than that corresponding element.For example ... Read More

Advertisements