Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1326130

    Is it possible to have a background animation like this on a color section? https://codepen.io/chris22smith/pen/RZogMa

    If so, how can this be set up?

    #1326150

    Hey navindesigns,

    There’s nothing like that in the theme by default unfortunately. But the example code is in the link you posted, if you implement the same markup and copy the CSS, then you might be able to get it to work.

    Best regards,
    Rikard

    #1326165

    Ok but how do I enter multiple classes in the color section in enfold? this example has bg bg3 bg3

    #1326204

    Hi,
    Thank you for the link to your example codepen, in order to do this you will have to place a code block element inside the color section because you need to create 4 div’s with the classes, it’s not just 4 classes.
    If you Enable the Avia Layout Builder Debugger on your site you can add this shortcode for a working example:
    2021-10-23_005.jpg

    [av_section min_height='100' min_height_pc='25' min_height_px='500px' padding='no-padding' custom_margin='0px' custom_margin_sync='true' svg_div_top='' svg_div_top_color='#333333' svg_div_top_width='100' svg_div_top_height='50' svg_div_top_max_height='none' svg_div_top_opacity='' svg_div_bottom='' svg_div_bottom_color='#333333' svg_div_bottom_width='100' svg_div_bottom_height='50' svg_div_bottom_max_height='none' svg_div_bottom_opacity='' color='main_color' background='bg_color' custom_bg='' background_gradient_direction='vertical' background_gradient_color1='#000000' background_gradient_color2='#ffffff' background_gradient_color3='' src='' attachment='' attachment_size='' attach='scroll' position='top left' repeat='no-repeat' video='' video_ratio='16:9' overlay_opacity='0.5' overlay_color='' overlay_pattern='' overlay_custom_pattern='' shadow='no-border-styling' bottom_border='no-border-styling' bottom_border_diagonal_color='#333333' bottom_border_diagonal_direction='' bottom_border_style='' custom_arrow_bg='' id='' custom_class='' template_class='' aria_label='' element_template='' one_element_template='' av_element_hidden_in_editor='0' av_uid='av-kv4ew82l' sc_version='1.0']
    
    [av_codeblock wrapper_element='' wrapper_element_attributes='' codeblock_type='' alb_description='' id='' custom_class='' template_class='' av_uid='av-kv4er17g' sc_version='1.0']
    <style>
    .bg {
      animation:slide 3s ease-in-out infinite alternate;
      background-image: linear-gradient(-60deg, #6c3 50%, #09f 50%);
      bottom:0;
      left:-50%;
      opacity:.5;
      position:fixed;
      right:-50%;
      top:0;
      z-index:-1;
    }
    
    .bg2 {
      animation-direction:alternate-reverse;
      animation-duration:4s;
    }
    
    .bg3 {
      animation-duration:5s;
    }
    
    .contentbox {
      background-color:rgba(255,255,255,.8);
      border-radius:.25em;
      box-shadow:0 0 .25em rgba(0,0,0,.25);
      box-sizing:border-box;
      left:50%;
      padding:10vmin;
      position:fixed;
      text-align:center;
      top:50%;
      transform:translate(-50%, -50%);
    }
    
    h1 {
      font-family:monospace;
    }
    
    @keyframes slide {
      0% {
        transform:translateX(-25%);
      }
      100% {
        transform:translateX(25%);
      }
    }
    </style>
    
    <div class="bg"></div>
    <div class="bg bg2"></div>
    <div class="bg bg3"></div>
    <div class="contentbox">
      <h1>Sliding Diagonals Background Effect</h1>
    </div>
    [/av_codeblock]
    
    [/av_section]

    the result:
    2021-10-23_006.jpg

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.