You can use oxygen generator background gradient to do cool S ** T

One of my favorite CSS aspects is how to put the CSS background image (already very flexible positioning Peace shop) and gradient layers to make very cool effects. We implement them in a large number of projects. In this article, I want to introduce something that you can use this Oxygen Builder function to create.

Like this content? Join our Facebook group (ISOGROUP), subscribe to current affairs communication, and check our oxygen machine courses (will be launched soon).

Disassembling (and response) color and photo background

Our preferred case is to build a full -wide division background, 50% of which are solid colors, 50 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50 % Is the image. You can use 3 DIV and Flexbox to do this, but the problem is that because the Oxygen processing part of the processing part, you will not be easy (and responsible) to maintain the largest page width.

oxygen part html

各向同性-2022-04-12-at-13-43-21
Although you you You can absolutely position a div and concentrate the
.ct-section-inner-wrap

class as a part, but it is usually much easier to use CSS gradient.

各向同性-2022-04-12-at-13-46-44 First, add the background image.

Then, add a gradient to the top, as shown below:

Transparent color 50%, solid color 50%, 50%of the same color.

各向同性-2022-04-12-at-13-48-14
Because we use the percentage, this is a response. This means that we can cover a CSS grid at the top and put some content in it.

If we use standardized filling, we can even use CALC (50% -youRPadding) to locate the background to \”merge\” to fill.

We can also use the response breakpoint to change the position, color and transparency of this effect according to the screen size (note: it seems damaged in Oxygen 4.0 beta 2). 各向同性-2022-04-12-at-13-50-07

color division background

The simplest effect is to remove the background image And simply divide the gradient between the two colors.

By setting the positioning of the two to 50%, it will not fade into it. Instead, the hard transition between the two colors.

各向同性-2022-04-12-at-13-41-00

Related posts

This is really flexible. We can even achieve hard conversion and fading in the same part:

各向同性-2022-04-12-at-13-42-04

Finally, if we add background images, we can superimposed these effects on the image.

各向同性-2022-04-12-at-13-43-53 Just add a standard background image.

Multi -color gradient 各向同性-2022-04-12-at-13-45-42
We can delete hard stop and combine the color together, as shown below:

You can add any number as needed. When merging the color together, I usually leave the position.

Animation it 各向同性-2022-04-12-at-13-24-00-1

A real basic animation can simply move the background. For this reason, please add the following CSS to the part with gradient:

Animation: Animation 5s slowdown; background size: 200% 200%; Then create a key frame of animation, And add it to your universal style table:

@-webkit-keyframes animation {0%{background-posity: 10%0%} 50%{backGroundd-POSITION: 91%100%} 100%{Background-POSITION: 10%0%} @-moz-keyframes animation {0%{background-posity: 10%0%} 50%{background-posity: 91%100 100 %} 1 100%{Background-POSITION: 10%0%}} @Keyframes Animation {0%{Background-POSITION: 10%0%} 50%{Background Location: 91%100%} 100%{Background Location: 10% 0%}}

General Animation

各向同性-2022-04-12-at-13-32-51
Because we double the size of the background gradient , So I pushed the color back to the center, just like this.
各向同性-2022-04-12-at-13-33-15

] The code in this section comes from this codepen.

You can also add a gradient frame for elements in Oxygen Builder according to this method. First, add your div.

Add a

. Gradient-Border . Paste this code into a custom CSS:

-Border width: 3px; background:#1D1F20; Location: Comparison; Border Rate state.

各向同性-2022-04-12-at-14-02-14

Paste the following custom CSS:

Location: absolute; top: calculation (-1 * var (-borderWidth)); Left: calculation (calculation (calculation (calculation (calculation ( -1 * var(–borderWidth)); 高度:计算(100% + var(–borderWidth)* 2); 宽度:计算(100% + var(–borderWidth)* 2); 边界半径:计算( 2 * VAR (-BorderWidth); Z index: -1;

Set background gradient as normal, or simply paste it to .Gradient-BordER: After's custom CSS:

各向同性-2022-04-12-at-13-59-11

[Background [background [ 123] :

linear-gradient (60 deg

,

#f79533

, #f37055 , #ef4e7b , [ 123]#A166AB , #5073b8

,

#1098ad 
, #07b39b , #6Fba82 ); ] code language: css ( css )
Now, whenever you use the .gradient-Border class should be used for DIV or elements, it will apply effects. Animation it You can add animation it: -webkit -animation: AnimatedGradient 3s Ease is unlimited; animation: AnimatedGradient 3s Ease alternate无限; 背景尺寸:300% 300%;.gradient-border:after

[123 ]

@-webkit-Keyframes Animation Gradient {0% {Background Location: 0% 50%;} 50% {Background Location: 100% 50%;} 100% {Background Location: 0% 50%;}} @Keyframes Animation Gradient {0% {Background Location: 0% 50%;} 50% {Background Location: 100% 50%;} 100% {Background Location: 0% 50%;}

To your general CSS.

This is CSS

You can use tools such as https://cssgradient.io/Pure CSS executes this operation.This tool generates the CSS linear gradient required for gradient.What you do is copy/paste into a custom CSS field of specific elements in Oxygen.

You may also like to read:

Related posts

各向同性-2022-04-12-at-13-10-37

Aglement at any time.We will not send spam, nor will we sell or share your email.

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *