Work with CSS Transitions

Giri Raju
Updated on 23-Jun-2020 16:27:52

101 Views

Use the transition property to work with CSS Transitions.You can try to run the following code to implement transitions in CSS:ExampleLive Demo                    div {             width: 150px;             height: 150px;             background: blue;             transition: width 4s;          }          div:hover {             width: 200px;          }                     Heading One       Hover over the below box to change its width.          

Build a Radial Gradient with the Shape of a Circle

Arjun Thakur
Updated on 23-Jun-2020 16:27:08

248 Views

To create a circle with radial gradient, you can try to run the following code. Set another parameter in radial gradient for shapes like circleExampleLive Demo                    #demo {             height: 400px;             background: radial-gradient(circle, red , blue, yellow);          }                     Radial Gradient       Radial Gradients    

What are CSS Transitions

varun
Updated on 23-Jun-2020 16:26:17

187 Views

With the transition effect, you can easily change the property values. You can also set a duration.Let us try to change the height of an element:ExampleLive Demo                    div {             width: 150px;             height: 150px;             background: blue;             transition: width 3s;          }          div:hover {             height: 200px;          }                     Heading One       Hover over the below box to change its height.          

CSS backface-visibility Property

George John
Updated on 23-Jun-2020 16:25:40

96 Views

To determine whether an element should be visible when not facing the screen or not, use the backface-visibility propertyExampleLive Demo                    .demo1 {             position: relative;             width: 150px;             height: 150px;             background-color: yellow;             perspective: 80px;             margin: 50px;             perspective-origin: left;             transform: rotateY(180deg);          }          .demo2 {             position: absolute;             padding: 20px;             background-color: orange;             transform-style: preserve-3d;             transform: rotateX(45deg);             backface-visibility: visible;          }                     Rotation       Demo          Demo                    

C++ Program to Display Fibonacci Series

Samual Sam
Updated on 23-Jun-2020 16:24:22

16K+ Views

The fibonacci series contains numbers in which each term is the sum of the previous two terms. This creates the following integer sequence −0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377…….The recurrence relation that defines the fibonacci numbers is as follows −F(n) = F(n-1) + F(n-2) F(0)=0 F(1)=1Programs to Display Fibonacci SeriesThere are two methods to display fibonacci series i.e. using dynamic programming and recursive programming. These are further explained as follows −Dynamic ProgrammingExample#include using namespace std; void fib(int n) {    int f[n];    int i;    f[0] = 0;    f[1] ... Read More

Specify Bottom Position of 3D Elements with CSS

Sreemaha
Updated on 23-Jun-2020 16:24:15

408 Views

To specify the bottom position of 3D elements, use the perspective-origin property.You can try to run the following code to implement the perspective-origin property:ExampleLive Demo                     .demo1 {             position: relative;             width: 150px;             height: 150px;             background-color: yellow;             perspective: 80px;             margin: 50px;             perspective-origin: left;          }          .demo2 {             position: absolute;             padding: 20px;             background-color: orange;             transform-style: preserve-3d;             transform: rotateX(45deg);          }                     Rotation       Demo          Demo                

Find Duplicate Rows in a Binary Matrix using Python

Paul Richard
Updated on 23-Jun-2020 16:19:16

364 Views

Given a binary matrix contains 0 and 1, our task is to find duplicate rows and print it.Python provides Counter() method which is used here.ExampleInput: 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 Output: (1, 1, 1, 1) (0, 0, 0, 0)AlgorithmStep 1: Create a binary matrix, only 0 and 1 elements are present. Step 2: Which will have rows as key and it’s frequency as value. Lists are mutable so first, we will cast each row (list) into a tuple. Step 3: Create a dictionary using the counter method. Step 4: ... Read More

Select Elements with a Specified Attribute and Value using CSS

Nitya Raut
Updated on 23-Jun-2020 16:18:28

239 Views

Use the [attribute = ”value”] selector to select elements with a specified attribute and value.You can try to run the following code to implement the CSS [attribute = "value"] Selector. Here, we have considered the attribute as rel,Example:Live Demo                 a[rel = nofollow] {          border: 3px solid blue;       }                     Uber's Business Model       Share Market    

Role of CSS Selector

Ankith Reddy
Updated on 23-Jun-2020 16:15:32

3K+ Views

Use the [attribute=”value”] selector to select elements with a specified attribute and value.You can try to run the following code to implement the CSS [attribute="value"] Selector. Here, we have considered the attribute as rel,ExampleLive Demo                    a[rel = nofollow] {             border: 3px solid orange;          }                     Uber's Business Model       Share Market    

Count Total Set Bits in Numbers from 1 to N in Python

Paul Richard
Updated on 23-Jun-2020 16:12:51

326 Views

Given a positive integer n, then we change to its binary representation and count the total number of set bits.ExampleInput : n=3 Output : 4AlgorithmStep 1: Input a positive integer data. Step 2: then convert it to binary form. Step 3: initialize the variable s = 0. Step 4: traverse every element and add. Step 5: display sum.Example Code# Python program to count set bits # in all numbers from 1 to n. def countbits(n):    # initialize the counter    c = 0    for i in range(1, n + 1):    c += bitsetcount(i)    return c    def bitsetcount(x):       if (x

Advertisements