Run Animation Backward First and Then Forwards with CSS

radhakrishna
Updated on 24-Jun-2020 05:50:15

2K+ Views

Use the animation-direction property to run animation in first backward and then forward. The property is used with the alternate-reverse animation value to achieve this.ExampleLive Demo                    div {             width: 150px;             height: 200px;             position: relative;             background-color: yellow;             animation-name: myanim;             animation-duration: 2s;             animation-direction: alternate-reverse;             animation-iteration-count: 3;          }          @keyframes myanim {             0% {background-color:green; left:0px; top:0px;}             50% {background-color:maroon; left:100px; top:100px;}             100% {background-color:gray; left:0px; top:0px;}          }                        

Select Elements Whose Attribute Value Contains a Specified Value with CSS

Chandu yadav
Updated on 24-Jun-2020 05:49:32

196 Views

To select elements whose attribute value contains a specified value, use the [attribute*=”value”] selector.You can try to run the following code to implement the CSS [attribute*="value"] selector,ExampleLive Demo                    [alt* = "tut"] {             border: 5px solid orange;             border-radius: 5px;          }                              

Select A Elements with Href Ending in .htm Using CSS

mkotla
Updated on 24-Jun-2020 05:47:59

461 Views

Use the [attribute$=”value”] selector to select elements whose attribute value ends with a specified value i.e. “.htm” here.You can try to run the following code to implement the CSS [attribute$="value"] Selector,ExampleLive Demo                    [href$ = htm] {             border: 5px solid orange;             border-radius: 5px;          }                     Java Tutorial       Java Tutorial PDF    

Delay Animation with CSS

Ankith Reddy
Updated on 24-Jun-2020 05:46:47

74 Views

To delay an animation, use the CSS animation-delay property. You can try to run the following code to delay animationExampleLive Demo                    div {             width: 150px;             height: 200px;             background-color: yellow;             animation-name: myanim;             animation-duration: 2s;             animation-delay: 2s;          }          @keyframes myanim {             from {                background-color: green;             }             to {                background-color: blue;             }          }                        

Use of Placement New in C++

Abhinanda Shri
Updated on 24-Jun-2020 05:46:44

461 Views

In a nutshell, placement new allows you to "construct" an object on memory that's already allocated to a given variable. This is useful for optimizations as it is faster to not reallocate and reuse the same memory that is already assigned to it. It can be used as follows −new (address) (type) initializerWe can specify an address where we want a new object of the given type to be constructed. Example#include using namespace std; int main() {    int a = 5;    cout

Create a Sticky Navbar with CSS

Nancy Den
Updated on 24-Jun-2020 05:45:55

2K+ Views

To create a sticky navbar, use the position: sticky; property. You can try to run the following code to create a sticky navbar, ExampleLive Demo                    ul {             list-style-type: none;             position: sticky;             overflow: hidden;             top: 0;             width: 100%;          }          li {             float: left;       ... Read More

Differences Between std::cplusplus11 and std::gnuplusplus11

George John
Updated on 24-Jun-2020 05:45:45

2K+ Views

GNU C++ compiler, g++, provides extensions to the C++ language. The difference between the two options is whether these GNU extensions that might violate the C++ standard are enabled or not. Note that some extensions can still be in effect when using -std = c++11, if they don't violate the standard.The list of extensions to the C++ language in GNU compiler can be found here − https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Extensions.html

C++11 Overview

George John
Updated on 24-Jun-2020 05:45:04

1K+ Views

C++11 is the modern C++ standard published in 2011. This brought many major extensions and improvements to the existing language. It was approved by International Organization for Standardization (ISO) on 12 August 2011 and replaced C++03.C++11 was also known as C++0x. This is because, For the next revision, it was supposed that the next Standard after would be done by 2008, but since it was uncertain, it was named C++0x, where the x stood for either 8 or 9. Though planning shifted and it is now called C++11. So, C++0x was the name for the standard before it was published. ... Read More

Access Local Variable from Different Function Using C++ Pointers

George John
Updated on 24-Jun-2020 05:42:36

1K+ Views

You can't access a local variable once it goes out of scope. This is what it means to be a local variable. Though, Let us look at an example where you MIGHT be able to access a local variable's memory outside its scope.Example#include int* foo() {    int x = 3;    return &x; } int main() {    int* address = foo();    cout

C++ Singleton Design Pattern Explained

Jennifer Nicholas
Updated on 24-Jun-2020 05:42:05

17K+ Views

Singleton design pattern is a software design principle that is used to restrict the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. For example, if you are using a logger, that writes logs to a file, you can use a singleton class to create such a logger. You can create a singleton class using the following code −Example#include using namespace std; class Singleton {    static Singleton *instance;    int data;      // Private constructor so that no objects can be created. ... Read More

Advertisements