html - :after pseudo element animation working in IE & Firefox, not Chrome -


using divi theme wordpress

what i'm trying animated dandelion image (see snippet). animation works fine in ie , firefox, not working in chrome.

the image replacing font-icon, '7' wrapped in span element. replaced span's content dandelion image, content url not show in firefox. have have "click scroll' text in :before pseudo element, why had use :after pseudo element.

i should note don't have ability manually change inside span element, have use css override it's contents.

what can animation work in chrome?

live version: http://gardenviewcare.wpengine.com/adult-day-center/

.et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a:before {    content: "click scroll";    display: block;    color: rgba(255, 255, 255, 0.75);    text-transform: uppercase;    letter-spacing: 1px;    font-size: 11px;    width: 80px;    line-height: 1;    margin-bottom: 10px;  }    span.scroll-down.et-pb-icon {    display: none;  }    .et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a:after {    content: url('http://gardenviewcare.wpengine.com/wp-content/uploads/2017/07/dandelion-icon.png') !important;    animation: swing 15s linear infinite;    transform: rotate(0);    transform-style: preserve-3d;  }    @keyframes swing {    0% {      transform: rotate(0);    }    25% {      transform: rotatex(15deg) rotatey(15deg) rotatez(15deg);    }    50% {      transform: rotatex(-15deg) rotatey(-20deg);    }    75% {      transform: rotatex(15deg) rotatey(10deg) rotatez(-15deg);    }    100% {      transform: rotatex(-10deg) rotatey(-5deg);    }  }      /** snippet sake can see icon, white **/    body {    background: #60bb46;  }
<link href="http://gardenviewcare.wpengine.com/wp-content/themes/divi-child-01/style.css" rel="stylesheet" />  <link href="http://gardenviewcare.wpengine.com/wp-content/themes/divi/style.css" rel="stylesheet" />  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>    <section class="et_pb_fullwidth_header et_pb_section_parallax et_pb_module et_pb_bg_layout_dark et_pb_text_align_center  et_pb_fullwidth_header_0">      <div class="et_pb_fullwidth_header_scroll" style="opacity: 1;"><a href="#"><span class="scroll-down et-pb-icon">7</span></a></div>  </section>

add display: block ::after element.

the official w3 specifications defines transformable element as:

an element layout governed css box model either block-level or atomic inline-level element, or ‘display’ property computes ‘table-row’, ‘table-row-group’, ‘table-header-group’, ‘table-footer-group’, ‘table-cell’, or ‘table-caption’ [css21]

(borrowed answer: https://stackoverflow.com/a/14883287/4573410)

.et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a:before {    content: "click scroll";    display: block;    color: rgba(255, 255, 255, 0.75);    text-transform: uppercase;    letter-spacing: 1px;    font-size: 11px;    width: 80px;    line-height: 1;    margin-bottom: 10px;  }    span.scroll-down.et-pb-icon {    display: none;  }    .et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a:after {    content: url('http://gardenviewcare.wpengine.com/wp-content/uploads/2017/07/dandelion-icon.png') !important;    animation: swing 15s linear infinite;    transform: rotate(0);    transform-style: preserve-3d;    display: block;  }    @keyframes swing {    0% {      transform: rotate(0);    }    25% {      transform: rotatex(15deg) rotatey(15deg) rotatez(15deg);    }    50% {      transform: rotatex(-15deg) rotatey(-20deg);    }    75% {      transform: rotatex(15deg) rotatey(10deg) rotatez(-15deg);    }    100% {      transform: rotatex(-10deg) rotatey(-5deg);    }  }      /** snippet sake can see icon, white **/    body {    background: #60bb46;  }
<section class="et_pb_fullwidth_header et_pb_section_parallax et_pb_module et_pb_bg_layout_dark et_pb_text_align_center  et_pb_fullwidth_header_0">      <div class="et_pb_fullwidth_header_scroll" style="opacity: 1;"><a href="#"><span class="scroll-down et-pb-icon">7</span></a></div>  </section>


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -