作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这个插件非常混合。我开发了一点这个插件。但我不知道如何添加 arrowColor 和 textColor 属性。我无法分享所有代码。因为超出了最大字符长度。
此外,您可以在 github 上看到原始插件: https://github.com/xbsoftware/enjoyhint
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<!-- EnjoyHint JS and CSS files -->
<script src="enjoyhint.js"></script>
<link href="enjoyhint/enjoyhint.css" rel="stylesheet">
<script type="text/javascript">
$(document).ready(function(){
var enjoyhint_instance = new EnjoyHint({});
var enjoyhint_script_steps = [
{
'next .navbar-brand' : 'Welcome to Turbo Search! Let me guide you through its features.',
'nextButton' : {className: "myNext", text: "Sure"},
'skipButton' : {className: "mySkip", text: "Nope!"}
'arrowColor':'0,255,255'
'textColor':'0,255,0'
},
{
'key #mySearchButton' : "Insert your search request and press 'Enter'",
'keyCode' : 13,
'arrowColor':'0,255,255'
'textColor':'0,255,0'
},
{
'click .btn' : 'This button allows you to switch between the search results'
'arrowColor':'0,255,255'
'textColor':'0,255,0'
},
{
'next .about' : 'Check the list of all the features available',
'shape': 'circle',
'arrowColor':'0,255,255'
'textColor':'0,255,0'
},
{
'next .contact' : 'Your feedback will be appreciated',
'shape': 'circle',
'radius': 70,
'showSkip' : false,
'nextButton' : {className: "myNext", text: "Got it!"},
'arrowColor':'0,255,255'
'textColor':'0,255,0'
}
];
enjoyhint_instance.set(enjoyhint_script_steps);
enjoyhint_instance.run();
});
</script>
最佳答案
enjoyHint 步骤属性中没有 arrowColor 和 textColor。
您可以在enjoyHint.css
文件中修改TextColor,如下所示:
.enjoy_hint_label {
color: #550055 !important;
}
正如我在上面的评论中所说,箭头是在插件核心中创建的 svg。所以你只能在那里修改它,我建议你在 enjoyhint.js
中查找:
var polilyne = $(makeSVG('path',
{style:
"fill:none;
stroke:rgb(255,255,255);
stroke-width:2", d: "M0,0 c30,11 30,9 0,20"
}));
上面为箭头点,下面为箭头线:
that.$svg.append(makeSVG('path',
{style:
"fill:none;
stroke:rgb(255,255,255);
stroke-width:3", 'marker-end': "url(#arrowMarker)", d: d, id: 'enjoyhint_arrpw_line'
}));
在两者中,查找 lines:rgb(...)
并使用所需的颜色更改内部的值...
关于javascript - Enjoy提示如何添加属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48825707/
我的边栏看起来非常舒服,位于我的内容下方,即页面的左侧。我怎样才能说服它留在它身边?它应该位于页面的右侧,内容位于左侧。我一直在尝试以前对类似问题的回答,但没有任何改变我得到的结果。 This is
我是一名优秀的程序员,十分优秀!