Found 1566 Articles for CSS

Why does SASS cache folder is created?

Shubham Vora
Updated on 19-Apr-2023 09:14:45

264 Views

What is SASS? The full form of the SASS is Syntactically Awesome Style Sheets. It is a preprocessor or compiler which we can use to compile the SCSS. Now, the question is that what is the SCSS? The SCSS allows developers to write CSS code in a better way as it contains the variables, nested rules, functions, etc., and similar advanced features. For example, we can use variables in SCSS, so we don’t need to write a single value multiple times but can access it using the variable name. Similarly, we can create functions in SCSS and stop ... Read More

Which directive is used to detect the errors in SASS?

Shubham Vora
Updated on 19-Apr-2023 07:53:50

172 Views

In SASS, the directive is a special symbol that starts with the ‘@’ character. There are various kinds of directives that are used in the SCSS code, instructing the compiler to process the code in a particular way. In this tutorial, we will learn about the @error and @debug directives used to throw an error or debug the code, respectively. @error directive in SASS The error directive is represented like ‘@error’, and we can use it whenever we require to throw an error. For example, if some condition doesn’t meet, we require to throw an error. Syntax Users ... Read More

Shimmer Effect using CSS

Shubham Vora
Updated on 19-Apr-2023 07:49:54

7K+ Views

The shimmer effect is an animation effect, and many websites add the shimmer effect in the loading indicator. It is an illusion of movement in the web page or HTML element. We can create a shimmer effect using various CSS properties such as linear gradients, keyframes, animation, background position, transform, etc. Basically, the shimmer effect adds alternative light and dark moving lines. Here, we will learn to create a shimmer effect using CSS. Syntax Users can follow the syntax below to create a shimmer effect using the CSS. .shimmer-div { background: linear-gradient animation: ... Read More

Responsive Card with hover effect using HTML and CSS

Shubham Vora
Updated on 21-Nov-2023 21:30:21

980 Views

While creating the responsive design for the application, it is also necessary to create a responsive card designs. Sometimes, developers require to add a hover effect on the card. So, when the user hovers over the card, it should change the style of the card. Here, we will learn to add a hover effect on the card and change the CSS whenever the user hovers over the card. Syntax Users can follow the syntax below to add the hover effect to the card. .card:hover { /* add css to set to element on hover */ ... Read More

Resize image proportionally with CSS

Shubham Vora
Updated on 18-Apr-2023 15:30:17

374 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

How to load CSS files using JavaScript?

Saba Hilal
Updated on 18-Apr-2023 15:23:15

5K+ Views

Sometimes, the task is change the page themes and to use different CSS files on the same page content. In such tasks the need is to fetch a CSS and load it dynamically while selecting a theme. In this case the CSS file has to be accessed, loaded and even selected through a javascript program. Using HTML and javascript code this process of loading the CSS file is demonstrated in this article. This is shown by using two different examples. In the first example, a CSS file is selected on the windows load event. In the second example, two buttons ... Read More

How to Switch CSS Class between Buttons Rendered with Map()?

Nikesh Jagsish Malik
Updated on 17-Apr-2023 16:09:11

207 Views

When building web applications, developers often need to create buttons with dynamic styles. One of the most efficient ways to do this is by using the map() method in JavaScript. This method allows you to render multiple buttons with different styles based on their data. However, sometimes you might want to change the CSS class of a button dynamically based on user interaction or other events. In this article, we will discuss two different approaches to switch CSS class between buttons rendered with map() in JavaScript. Algorithm The algorithm to switch CSS class between buttons rendered with map() involves the ... Read More

How to break a line without using br tag in HTML / CSS?

Asif Rahaman
Updated on 24-Nov-2023 01:19:59

2K+ Views

Introduction Breaking a line without using the tag in HTML / CSS can be useful in situations where you want to create space between elements, but don't want to add a new line of text. There are a few different ways to achieve this effect using CSS, which we'll explore in this article. Before HTML5 and CSS programmers often used the tag. However, now we have much better techniques and in fact, the usage of is obsolete nowadays. In this article, we shall learn how to break lines without using the tag in HTML and CSS ... Read More

How to blend elements in CSS?

Asif Rahaman
Updated on 17-Apr-2023 14:30:05

155 Views

Introduction Blending elements in CSS is a technique used to create interesting visual effects and enhance the design of a web page. With the mix-blend-mode property in CSS, you can control how an element blends with the content below it. In this article, we'll explore how to use mix-blend mode to blend elements in CSS. Understanding Mix-Blend-Mode mix-blend-mode is a CSS property that allows you to set the blending mode for an element. Blending modes determine how two elements blend together, with different modes producing different visual effects. By default, an element in CSS will have a blending mode of ... Read More

How to create image magnifier using?

Aayush Mohan Sinha
Updated on 14-Jul-2023 17:06:05

645 Views

In the contemporary digital era, where the visual appeal of a website is of utmost importance in captivating users, it is crucial to integrate interactive and enthralling components into your web pages. A prominent example of such features is an image magnifier that permits users to zoom in on pictures for a closer inspection. By utilizing the power of HTML and CSS, it is plausible to fabricate a straightforward yet potent image magnifier that enhances the user experience and imparts a polished touch to your website. This piece of writing shall expound upon the requisite steps and methodologies involved in ... Read More

Advertisements