【问题标题】:Turn Radio buttons to star rating using Elementor page builder使用 Elementor 页面构建器将单选按钮转换为星级
【发布时间】:2021-02-22 06:22:05
【问题描述】:

我正在尝试将使用 elementor 页面构建器制作的表单上的所有单选按钮转换为星级选项。

我尝试过使用这个 CSS https://codeconvey.com/css-star-rating-radio-buttons/ 用 .elementor-field-subgroup 替换 .rating - 无效。

我可以使用任何想法吗?

更新:

我试过这个 CSS 和 Jscript:

.elementor-field-group-stars label:after {font-family:eicons; content:"\e933"; color:gold}
.elementor-field-group-stars:hover label:after {content:"\e934"!important;}
.elementor-field-group-stars .elementor-field-option:hover ~ .elementor-field-option > label:after {content:"\e933"!important;}
.elementor-field-group-stars.selected label:after {content:"\e934";}
.elementor-field-group-stars.selected .elementor-field-option.active ~ .elementor-field-option label:after {content:"\e933"}
.elementor-field-group-stars input {display:none!important}
.elementor-field-group-stars label {color:transparent}
.elementor-field-group-stars .elementor-field-option {padding:0!important}


$('.elementor-field-group-stars input').click(function() {
               if($('.elementor-field-group-stars input').is(':checked'))  {
                   $(".elementor-field-group-stars").addClass("selected");
                   $(".elementor-field-option").removeClass("active");
                   $(this).parent().addClass("active");
}
});

一次只适用于一个单选按钮 - 而不是页面上的所有单选按钮 - 关闭 - 但还没有

【问题讨论】:

    标签: css forms radio-button elementor


    【解决方案1】:

    我不认为您可以使用 Elementor 直接将单选按钮更改为星星,但既然您提到使用它,Elementor 有一个预制的星级小部件可供您使用。根据个人经验,我可以说它运行良好,您可以根据自己的喜好进行设计。

    这里是 YouTube 的链接,您可以在其中查看更多信息: https://www.youtube.com/watch?v=3J6LcRzknTc&feature=emb_title

    【讨论】:

    • 嗨,我需要一个星级评分来让用户回答满意度调查,而不是在屏幕上显示星级。这就是为什么我需要使用表单/
    • 那么也许这样的事情会对你有所帮助。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-01-03
    • 2014-03-18
    • 1970-01-01
    • 1970-01-01
    • 2013-12-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多