Shubham Vora

Shubham Vora

793 Articles Published

Articles by Shubham Vora

Page 33 of 80

Which methods are used to set styles on selected elements in jQuery?

Shubham Vora
Shubham Vora
Updated on 19-Apr-2023 446 Views

Developers can use JavaScritp or JQuery to manipulate the style of the HTML elements. For that, first, developers need to access the HTML elements using JQuery and then use various methods to set the style for selected HTML elements. Sometimes, we require to manage elements styles using JQuery. For example, when users click the button, we need to change the text's colour, image dimensions, etc. In this case, we can use the JQuery methods below to change the HTML elements' style. Use the CSS() method of JQuery to set styles on selected elements The first method is the css() ...

Read More

Resize image proportionally with CSS

Shubham Vora
Shubham Vora
Updated on 18-Apr-2023 636 Views

To make a responsive design of the application, we also require to make an image responsive. If images are not responsive, overflow occurs in the app, and it looks worst. So, we also require to increase or decrease the images' dimensions proportional to the parent element's dimensions. Here, we will learn various ways to resize images proportionally with CSS. Syntax Users can follow the syntax below to resize the image proportionally using the ‘width’ CSS property. img { width: 100%; height: auto; } In the above syntax, we have set 100% width ...

Read More

Which property specifies the right padding of an element in CSS?

Shubham Vora
Shubham Vora
Updated on 12-Apr-2023 313 Views

In CSS, the padding property allows us to add extra space between the HTML element’s border and its content. The right padding means only adding the space between the element’s content and the right border. Here, we will learn two different properties to specify the right padding of an element. Use the padding-right CSS Property The ‘padding-right’ property specifies the right padding of an element in CSS. Whenever we specify the right padding for an element, the width of the element becomes equal to the actual width + right padding. Syntax Users can follow the syntax below to specify the ...

Read More

Which property is used to make a font oblique?

Shubham Vora
Shubham Vora
Updated on 11-Apr-2023 461 Views

In CSS, we can use the ‘font-style’ property to set the style of the font. We can use the different styles as a value of the font-style property, and ‘oblique’ is one of them. Basically, the ‘oblique’ font is a sloppy version of the text, and we set the angle to decrease or increase the slope of the text. Here, we will make a font oblique in the various examples. Syntax Users can follow the syntax below to make a font oblique using the font-style property of CSS. font-style: oblique; Example 1 In the example below, we have created ...

Read More

Which one should we use ‘border: none’ or ‘border: 0 ‘?

Shubham Vora
Shubham Vora
Updated on 11-Apr-2023 1K+ Views

In CSS, the ‘border’ property is used to add a border to the HTML elements. We can add a border of widths, styles, and colours to the HTML element. Two border values come to mind when we need to remove the border from any element. The first value is ‘none’, and the second is ‘0’. Sometimes, it creates confusion about which value we should use, and in this tutorial, we will clear that doubt. Syntax Users can follow the syntax below to use the ‘none’ or ‘0’ as a value of the ‘border’ property. border: none; border: 0; Border: ...

Read More

What is maximum & minimum value for z-index property in CSS?

Shubham Vora
Shubham Vora
Updated on 11-Apr-2023 3K+ Views

In CSS, the z-index property is used to put one element on another. For example, we can create a stack of multiple HTML elements using CSS. If you have ever used the z-index property, you must have seen its value like 9, 99, 999, 0, -9, -99999, etc. Have you ever asked yourself what could be the maximum value of the z-index, and have you researched about that on the internet? If not, go through this guide. The maximum value of the z-index property is equal to 2147483647, and the minimum value is -2147483647. The number 2147483647 equals 232, the ...

Read More

Image Classification using JavaScript

Shubham Vora
Shubham Vora
Updated on 07-Apr-2023 1K+ Views

The meaning of image classification is to extract as much information from the image as possible. For example, when you upload an image to Google photos, it extracts information from the image and suggests the location based on that. We can use OpenCV to detect every small information from the image and predict the image. Training and testing models from scratch using JavaScript requires lots of effort, and also, it requires the proper dataset containing the different images. So, in this tutorial, we will use the pre-trained model of ml5.js to classify the image. The ml5.js library contains various pre-trained ...

Read More

How TypeScript Compilation Works?

Shubham Vora
Shubham Vora
Updated on 06-Apr-2023 4K+ Views

The popular programming language TypeScript has been widely adopted by developers in recent years. It is a superset of JavaScript that enhances the language with static typing and other features to make complicated application development simpler and error-prone. However, TypeScript code must be compiled into JavaScript because it cannot be performed directly in a browser or server. Any developer using TypeScript must comprehend how TypeScript compilation operates. There are multiple processes in the TypeScript compilation process, including parsing, type-checking, outputting JavaScript, bundling, and execution. The TypeScript compiler parses the code during the parsing phase and creates an abstract syntax tree ...

Read More

How to use protractor to wait for the element’s attribute to change to a particular value?

Shubham Vora
Shubham Vora
Updated on 06-Apr-2023 587 Views

We will learn to use protractor to wait for the element’s attribute to change to a particular value. Protractor is an end-to-end testing framework for Angular and AngularJS applications. Protractor has built-in support for waiting for Angular-specific elements to load and be ready before performing test operations. We need to learn this topic to ensure that tests only proceed when specific elements are ready, avoiding errors and improving the accuracy of the test results. Waiting for an attribute to change to a particular value also helps identify and debug issues related to data manipulation and other dynamic events on the ...

Read More

How to use protractor to check whether text is present in an element or not?

Shubham Vora
Shubham Vora
Updated on 06-Apr-2023 529 Views

We will learn to use Protractor to check whether text is present in an element or not. Protractor is an end-to-end testing framework for Angular and AngularJS applications. It uses WebDriverJS and runs tests written in Jasmine or Mocha, allowing for automated browser testing of web applications. Protractor can simulate user interaction with the application, test for expected behaviour, and report on test results. It also includes several features designed specifically for Angular, such as the ability to wait for Angular-specific elements to load before executing tests. Note − To use a protractor, ensure that the protractor installation and setup ...

Read More
Showing 321–330 of 793 articles
« Prev 1 31 32 33 34 35 80 Next »
Advertisements