Jquery 如何使用ACF在wordpress中悬停特色img

Jquery 如何使用ACF在wordpress中悬停特色img,jquery,wordpress,hover,advanced-custom-fields,Jquery,Wordpress,Hover,Advanced Custom Fields,我有密码 <div class=""/> <a href="<?php echo get_permalink( $post->ID ); ?>"> <?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. the_post_thumbnail

我有密码

<div class=""/> <a href="<?php echo get_permalink( $post->ID ); ?>"> <?php
        if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
            the_post_thumbnail( 'full', array( 'class'  => 'img-fluid d-block mx-auto' ) ); // show featured image
        }

将此代码放入您的文件中

<div class=""/> <a href="<?php echo get_permalink( $post->ID ); ?>"> <?php the_field('imghover');?></div>
    

我认为它只会在代码中添加hover-img。我想功能img和后,我去img我会看到鼠标hover@stecu如果要从ACFfor hover(img上的mounce)获取“imghover”值,您需要为悬停效果添加一些css代码……是的,但我需要onmouseover和onmouseout函数