- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
以下example显示了在 intro.js 的第二步中激活的 Bootstrap 模式。不幸的是,我不知道如何让 intro.js 的叠加透明,以便您可以看到模态。另外,我想在这个 example 中添加一个进度条.希望有人可以帮助我。
HTML
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal" data-step="1" data-intro="Open model" id='show-popup-button'>
Launch demo modal
</button>
<button class="btn btn-primary btn-lg" id="start-intro-btn" data-step="3" data-intro="Close model">
Launch intro
</button>
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content" data-step="2" data-intro="alignment model is not correct">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">title</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" id='close-modal-button'>
</div>
<div class="modal-body">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vel vehicula erat. Phasellus vestibulum leo eu mi tempor blandit. Suspendisse eget iaculis lectus. Donec vitae tempus enim, quis tristique magna. Donec lobortis, sem ac pretium viverra, leo nisl consequat arcu, sit amet ullamcorper nunc turpis ac erat. In rutrum auctor ligula, quis mattis enim lacinia eu. Aliquam at magna a erat laoreet iaculis quis a justo. Donec porttitor vulputate massa, nec suscipit nisi mollis sed.</p>
<p>Praesent sit amet porttitor magna, auctor feugiat tellus. Sed venenatis tortor turpis, vel vestibulum eros pulvinar et. Pellentesque hendrerit diam quis dui euismod tincidunt. Sed sit amet mauris ipsum. Integer in magna tellus. In tincidunt mi quis nunc gravida sollicitudin. Aliquam ac dui eget erat consequat volutpat in eu magna.</p>
<p>Sed feugiat bibendum leo consequat convallis. Donec facilisis, turpis a scelerisque venenatis, felis diam dictum tortor, vitae imperdiet tortor ligula eu lectus. Donec iaculis semper elementum. Nullam dapibus porttitor magna quis convallis. Morbi porttitor quam non magna ullamcorper rhoncus. Phasellus sit amet nunc at turpis pharetra luctus a a massa. Praesent luctus massa in odio faucibus eleifend.</p>
<p>In eget lobortis leo, ut luctus odio. Mauris pharetra erat ac tellus hendrerit semper. Cras faucibus ipsum id ante hendrerit rutrum. Donec vitae ullamcorper arcu. Aliquam pellentesque faucibus placerat. Aliquam erat volutpat. In tincidunt metus sit amet ligula sagittis vehicula. Pellentesque velit quam, hendrerit a erat ac, fermentum tincidunt enim. Cras suscipit justo nec consectetur lacinia.</p>
<p>Cras pellentesque urna a leo egestas, at ullamcorper augue suscipit. Nulla id lacinia magna, non iaculis est. Praesent a placerat augue, eget eleifend purus. Aenean dignissim, orci et rutrum facilisis, tellus massa porta nulla, quis hendrerit dui ipsum vitae urna. In mattis lectus dolor, id venenatis lectus pellentesque at. Suspendisse posuere metus vel bibendum dignissim. Fusce interdum magna id libero scelerisque suscipit. Duis orci augue, rhoncus eget pharetra ac, viverra nec magna. In accumsan nulla ac suscipit pellentesque. Nulla iaculis luctus tellus, at ultricies urna hendrerit a. Aenean vehicula sodales varius. Duis sodales hendrerit odio non sagittis.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" id='close-modal-button' data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
JavaScript
var startIntroButton = $('#start-intro-btn');
startIntroButton.on('click', function() {
var introJsStarted = introJs().start();
introJsStarted
.oncomplete(function() { $('#myModal').hide();
}).onexit(function(){ $('#myModal').hide();
}).onchange(function(targetElement) {
if($(targetElement).attr("data-step") == 2) {
$('#myModal').show();
}
if($(targetElement).attr("data-step") != 2) {
$('#myModal').hide();
}
});
});
var showPopupButton = $('#show-popup-button');
showPopupButton.on('click', function() {
$('#myModal').show();
});
var closePopupButton = $('#close-modal-button');
closePopupButton.on('click', function() {
$('#myModal').hide();
});
CSS
.modal-body {
max-height: calc(100vh - 210px);
overflow-y: auto;
}
body { margin: 20px; }
.introjs-overlay {
position: absolute;
box-sizing: content-box;
z-index: 999999;
background-color: #000;
opacity: 0;
background: -moz-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.4) 0, rgba(0, 0, 0, 0.9) 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, rgba(0, 0, 0, 0.4)), color-stop(100%, rgba(0, 0, 0, 0.9)));
background: -webkit-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.4) 0, rgba(0, 0, 0, 0.9) 100%);
background: -o-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.4) 0, rgba(0, 0, 0, 0.9) 100%);
background: -ms-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.4) 0, rgba(0, 0, 0, 0.9) 100%);
background: radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.4) 0, rgba(0, 0, 0, 0.9) 100%);
filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#66000000',endColorstr='#e6000000',GradientType=1)";
-ms-filter: "alpha(opacity=50)";
filter: alpha(opacity=50);
-webkit-transition: all .3s ease-out;
-moz-transition: all .3s ease-out;
-ms-transition: all .3s ease-out;
-o-transition: all .3s ease-out;
transition: all .3s ease-out
}
.introjs-fixParent {
z-index: auto !important;
opacity: 1.0 !important;
-webkit-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
-o-transform: none !important;
transform: none !important
}
.introjs-showElement,
tr.introjs-showElement>td,
tr.introjs-showElement>th {
z-index: 9999999 !important
}
.introjs-disableInteraction {
z-index: 99999999 !important;
position: absolute;
background-color: white;
opacity: 0;
filter: alpha(opacity=0)
}
.introjs-relativePosition,
tr.introjs-showElement>td,
tr.introjs-showElement>th {
position: relative
}
.introjs-helperLayer {
box-sizing: content-box;
position: absolute;
z-index: 9999998;
background-color: #FFF;
background-color: rgba(255, 255, 255, .9);
border: 1px solid #777;
border: 1px solid rgba(0, 0, 0, .5);
border-radius: 4px;
box-shadow: 0 2px 15px rgba(0, 0, 0, .4);
-webkit-transition: all .3s ease-out;
-moz-transition: all .3s ease-out;
-ms-transition: all .3s ease-out;
-o-transition: all .3s ease-out;
transition: all .3s ease-out
}
.introjs-tooltipReferenceLayer {
box-sizing: content-box;
position: absolute;
visibility: hidden;
z-index: 10000000;
background-color: transparent;
-webkit-transition: all .3s ease-out;
-moz-transition: all .3s ease-out;
-ms-transition: all .3s ease-out;
-o-transition: all .3s ease-out;
transition: all .3s ease-out
}
.introjs-helperLayer *,
.introjs-helperLayer *:before,
.introjs-helperLayer *:after {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
-ms-box-sizing: content-box;
-o-box-sizing: content-box;
box-sizing: content-box
}
.introjs-helperNumberLayer {
box-sizing: content-box;
position: absolute;
visibility: visible;
top: -16px;
left: -16px;
z-index: 9999999999 !important;
padding: 2px;
font-family: Arial, verdana, tahoma;
font-size: 13px;
font-weight: bold;
color: white;
text-align: center;
text-shadow: 1px 1px 1px rgba(0, 0, 0, .3);
background: #ff3019;
background: -webkit-linear-gradient(top, #ff3019 0, #cf0404 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ff3019), color-stop(100%, #cf0404));
background: -moz-linear-gradient(top, #ff3019 0, #cf0404 100%);
background: -ms-linear-gradient(top, #ff3019 0, #cf0404 100%);
background: -o-linear-gradient(top, #ff3019 0, #cf0404 100%);
background: linear-gradient(to bottom, #ff3019 0, #cf0404 100%);
width: 20px;
height: 20px;
line-height: 20px;
border: 3px solid white;
border-radius: 50%;
filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3019', endColorstr='#cf0404', GradientType=0)";
filter: "progid:DXImageTransform.Microsoft.Shadow(direction=135, strength=2, color=ff0000)";
box-shadow: 0 2px 5px rgba(0, 0, 0, .4)
}
.introjs-arrow {
border: 5px solid white;
content: '';
position: absolute
}
.introjs-arrow.top {
top: -10px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: white;
border-left-color: transparent
}
.introjs-arrow.top-right {
top: -10px;
right: 10px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: white;
border-left-color: transparent
}
.introjs-arrow.top-middle {
top: -10px;
left: 50%;
margin-left: -5px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: white;
border-left-color: transparent
}
.introjs-arrow.right {
right: -10px;
top: 10px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: white
}
.introjs-arrow.right-bottom {
bottom: 10px;
right: -10px;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: white
}
.introjs-arrow.bottom {
bottom: -10px;
border-top-color: white;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: transparent
}
.introjs-arrow.left {
left: -10px;
top: 10px;
border-top-color: transparent;
border-right-color: white;
border-bottom-color: transparent;
border-left-color: transparent
}
.introjs-arrow.left-bottom {
left: -10px;
bottom: 10px;
border-top-color: transparent;
border-right-color: white;
border-bottom-color: transparent;
border-left-color: transparent
}
.introjs-tooltip {
box-sizing: content-box;
position: absolute;
visibility: visible;
padding: 10px;
background-color: white;
min-width: 200px;
max-width: 300px;
border-radius: 3px;
box-shadow: 0 1px 10px rgba(0, 0, 0, .4);
-webkit-transition: opacity .1s ease-out;
-moz-transition: opacity .1s ease-out;
-ms-transition: opacity .1s ease-out;
-o-transition: opacity .1s ease-out;
transition: opacity .1s ease-out
}
.introjs-tooltipbuttons {
text-align: right;
white-space: nowrap
}
.introjs-button {
box-sizing: content-box;
position: relative;
overflow: visible;
display: inline-block;
padding: .3em .8em;
border: 1px solid #d4d4d4;
margin: 0;
text-decoration: none;
text-shadow: 1px 1px 0 #fff;
font: 11px/normal sans-serif;
color: #333;
white-space: nowrap;
cursor: pointer;
outline: 0;
background-color: #ececec;
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f4f4f4), to(#ececec));
background-image: -moz-linear-gradient(#f4f4f4, #ececec);
background-image: -o-linear-gradient(#f4f4f4, #ececec);
background-image: linear-gradient(#f4f4f4, #ececec);
-webkit-background-clip: padding;
-moz-background-clip: padding;
-o-background-clip: padding-box;
-webkit-border-radius: .2em;
-moz-border-radius: .2em;
border-radius: .2em;
zoom: 1;
*display: inline;
margin-top: 10px
}
.introjs-button:hover {
border-color: #bcbcbc;
text-decoration: none;
box-shadow: 0 1px 1px #e3e3e3
}
.introjs-button:focus,
.introjs-button:active {
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ececec), to(#f4f4f4));
background-image: -moz-linear-gradient(#ececec, #f4f4f4);
background-image: -o-linear-gradient(#ececec, #f4f4f4);
background-image: linear-gradient(#ececec, #f4f4f4)
}
.introjs-button::-moz-focus-inner {
padding: 0;
border: 0
}
.introjs-skipbutton {
box-sizing: content-box;
margin-right: 5px;
color: #7a7a7a
}
.introjs-prevbutton {
-webkit-border-radius: .2em 0 0 .2em;
-moz-border-radius: .2em 0 0 .2em;
border-radius: .2em 0 0 .2em;
border-right: 0
}
.introjs-prevbutton.introjs-fullbutton {
border: 1px solid #d4d4d4;
-webkit-border-radius: .2em;
-moz-border-radius: .2em;
border-radius: .2em
}
.introjs-nextbutton {
-webkit-border-radius: 0 .2em .2em 0;
-moz-border-radius: 0 .2em .2em 0;
border-radius: 0 .2em .2em 0
}
.introjs-nextbutton.introjs-fullbutton {
-webkit-border-radius: .2em;
-moz-border-radius: .2em;
border-radius: .2em
}
.introjs-disabled,
.introjs-disabled:hover,
.introjs-disabled:focus {
color: #9a9a9a;
border-color: #d4d4d4;
box-shadow: none;
cursor: default;
background-color: #f4f4f4;
background-image: none;
text-decoration: none
}
.introjs-hidden {
display: none
}
.introjs-bullets {
text-align: center
}
.introjs-bullets ul {
box-sizing: content-box;
clear: both;
margin: 15px auto 0;
padding: 0;
display: inline-block
}
.introjs-bullets ul li {
box-sizing: content-box;
list-style: none;
float: left;
margin: 0 2px
}
.introjs-bullets ul li a {
box-sizing: content-box;
display: block;
width: 6px;
height: 6px;
background: #ccc;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
text-decoration: none;
cursor: pointer
}
.introjs-bullets ul li a:hover {
background: #999
}
.introjs-bullets ul li a.active {
background: #999
}
.introjs-progress {
box-sizing: content-box;
overflow: hidden;
height: 10px;
margin: 10px 0 5px 0;
border-radius: 4px;
background-color: #ecf0f1
}
.introjs-progressbar {
box-sizing: content-box;
float: left;
width: 0;
height: 100%;
font-size: 10px;
line-height: 10px;
text-align: center;
background-color: #08c
}
.introjsFloatingElement {
position: absolute;
height: 0;
width: 0;
left: 50%;
top: 50%
}
.introjs-fixedTooltip {
position: fixed
}
.introjs-hint {
box-sizing: content-box;
position: absolute;
background: transparent;
width: 20px;
height: 15px;
cursor: pointer
}
.introjs-hint:focus {
border: 0;
outline: 0
}
.introjs-hidehint {
display: none
}
.introjs-fixedhint {
position: fixed
}
.introjs-hint:hover>.introjs-hint-pulse {
border: 5px solid rgba(60, 60, 60, 0.57)
}
.introjs-hint-pulse {
box-sizing: content-box;
width: 10px;
height: 10px;
border: 5px solid rgba(60, 60, 60, 0.27);
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
background-color: rgba(136, 136, 136, 0.24);
z-index: 10;
position: absolute;
-webkit-transition: all .2s ease-out;
-moz-transition: all .2s ease-out;
-ms-transition: all .2s ease-out;
-o-transition: all .2s ease-out;
transition: all .2s ease-out
}
.introjs-hint-no-anim .introjs-hint-dot {
-webkit-animation: none;
-moz-animation: none;
animation: none
}
.introjs-hint-dot {
box-sizing: content-box;
border: 10px solid rgba(146, 146, 146, 0.36);
background: transparent;
-webkit-border-radius: 60px;
-moz-border-radius: 60px;
border-radius: 60px;
height: 50px;
width: 50px;
-webkit-animation: introjspulse 3s ease-out;
-moz-animation: introjspulse 3s ease-out;
animation: introjspulse 3s ease-out;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
animation-iteration-count: infinite;
position: absolute;
top: -25px;
left: -25px;
z-index: 1;
opacity: 0
}
@-webkit-keyframes introjspulse {
0% {
-webkit-transform: scale(0);
opacity: .0
}
25% {
-webkit-transform: scale(0);
opacity: .1
}
50% {
-webkit-transform: scale(0.1);
opacity: .3
}
75% {
-webkit-transform: scale(0.5);
opacity: .5
}
100% {
-webkit-transform: scale(1);
opacity: .0
}
}
@-moz-keyframes introjspulse {
0% {
-moz-transform: scale(0);
opacity: .0
}
25% {
-moz-transform: scale(0);
opacity: .1
}
50% {
-moz-transform: scale(0.1);
opacity: .3
}
75% {
-moz-transform: scale(0.5);
opacity: .5
}
100% {
-moz-transform: scale(1);
opacity: .0
}
}
@keyframes introjspulse {
0% {
transform: scale(0);
opacity: .0
}
25% {
transform: scale(0);
opacity: .1
}
50% {
transform: scale(0.1);
opacity: .3
}
75% {
transform: scale(0.5);
opacity: .5
}
100% {
transform: scale(1);
opacity: .0
}
}
最佳答案
您可以将模态框放在叠加层前面,这样按钮仍会突出显示,但您可以在介绍控件后面看到模态框。这需要将 Bootstrap 的模式 z-index 设置为高于 introjs 覆盖层,并覆盖 introjs modal-fixer 样式。
.modal{
z-index:1000000;
}
.introjs-fixParent.modal{
z-index:10000000 !important;
}
脚本只是缺少 setOption('showProgress', true)
关于javascript - Bootstrap 4 模态与 intro.js transparant,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51389422/
我正在学习构建单页应用程序 (SPA) 所需的所有技术。总而言之,我想将我的应用程序实现为单独的层,其中前端仅使用 API Web 服务(json 通过 socket.io)与后端通信。前端基本上是
当我看到存储在我的数据库中的日期时。 这是 正常 。日期和时间就是这样。 但是当我运行 get 请求来获取数据时。 此格式与存储在数据库 中的格式不同。为什么会发生这种情况? 最佳答案 我认为您可以将
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我正在尝试使用backbone.js 实现一些代码 和 hogan.js (http://twitter.github.com/hogan.js/) Hogan.js was developed ag
我正在使用 Backbone.js、Node.js 和 Express.js 制作一个 Web 应用程序,并且想要添加用户功能(登录、注销、配置文件、显示内容与该用户相关)。我打算使用 Passpor
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
我尝试在 NodeJS 中加载数据,然后将其传递给 ExpressJS 以在浏览器中呈现 d3 图表。 我知道我可以通过这种方式加载数据 - https://github.com/mbostock/q
在 node.js 中,我似乎遇到了相同的 3 个文件名来描述应用程序的主要入口点: 使用 express-generator 包时,会创建一个 app.js 文件作为生成应用的主要入口点。 通过 n
最近,我有机会观看了 john papa 关于构建单页应用程序的精彩类(class)。我会喜欢的。它涉及服务器端和客户端应用程序的方方面面。 我更喜欢客户端。在他的实现过程中,papa先生在客户端有类
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我是一个图形新手,需要帮助了解各种 javascript 2D 库的功能。 . . 我从 Pixi.js 中得到了什么,而我没有从 Konva 等基于 Canvas 的库中得到什么? 我从 Konva
我正在尝试将一些 LESS 代码(通过 ember-cli-less)构建到 CSS 文件中。 1) https://almsaeedstudio.com/ AdminLTE LESS 文件2) Bo
尝试查看 Express Passport 中所有登录用户的所有 session ,并希望能够查看当前登录的用户。最好和最快的方法是什么? 我在想也许我可以在登录时执行此操作并将用户模型数据库“在线”
我有一个 React 应用程序,但我需要在组件加载完成后运行一些客户端 js。一旦渲染函数完成并加载,运行与 DOM 交互的 js 的最佳方式是什么,例如 $('div').mixItUp() 。对
请告诉我如何使用bodyparser.raw()将文件上传到express.js服务器 客户端 // ... onFilePicked(file) { const url = 'upload/a
我正在尝试从 Grunt 迁移到 Gulp。这个项目在 Grunt 下运行得很好,所以我一定是在 Gulp 中做错了什么。 除脚本外,所有其他任务均有效。我现在厌倦了添加和注释部分。 我不断收到与意外
我正在尝试更改我的网站名称。找不到可以设置标题或应用程序名称的位置。 最佳答案 您可以在 config/ 目录中创建任何文件,例如 config/app.js 包含如下内容: module.expor
经过多年的服务器端 PHP/MySQL 开发,我正在尝试探索用于构建现代 Web 应用程序的新技术。 我正在尝试对所有 JavaScript 内容进行排序,如果我理解得很好,一个有效的解决方案可以是服
我是 Nodejs 的新手。我在 route 目录中有一个 app.js 和一个 index.js。我有一个 app.use(multer....)。我还定义了 app.post('filter-re
我正在使用 angular-seed用于构建我的应用程序的模板。最初,我将所有 JavaScript 代码放入一个文件 main.js。该文件包含我的模块声明、 Controller 、指令、过滤器和
我是一名优秀的程序员,十分优秀!