- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我遇到的问题,您可以通过 codepen.io 查看就是无论我做什么,我都无法让 mdl-stepper 使其高度与里面的内容相同。
这似乎没有真正的 getmdl.io。
CSS(我知道这是问题所在)
/**
* mdl-stepper - A Material Design Lite Stepper component polyfill.
* @version v1.1.6
* @author Alexandre Thebaldi <ahlechandre@gmail.com>.
* @link https://github.com/ahlechandre/mdl-stepper
*
*/
/* MDL Stepper */
/**
* mdl-stepper - A Material Design Lite Stepper component polyfill.
* @version v1.1.6
* @author Alexandre Thebaldi <ahlechandre@gmail.com>.
* @link https://github.com/ahlechandre/mdl-stepper
*
*/
/* STEPPER */
/* GRID */
/* SHADOWS */
/**
* mdl-stepper - A Material Design Lite Stepper component polyfill.
* @version v1.1.6
* @author Alexandre Thebaldi <ahlechandre@gmail.com>.
* @link https://github.com/ahlechandre/mdl-stepper
*
*/
/* Animation */
/* KEYFRAMES */
/* DISPLAY FLEX */
/* Shadows */
/**
* mdl-stepper - A Material Design Lite Stepper component polyfill.
* @version v1.1.6
* @author Alexandre Thebaldi <ahlechandre@gmail.com>.
* @link https://github.com/ahlechandre/mdl-stepper
*
* @contributor Michael Haschke <http://michael.haschke.biz/>
*/
/**
* mdl-stepper - A Material Design Lite Stepper component polyfill.
* @version v1.1.6
* @author Alexandre Thebaldi <ahlechandre@gmail.com>.
* @link https://github.com/ahlechandre/mdl-stepper
*
*/
/* STEPPER */
/* GRID */
/* SHADOWS */
/**
* mdl-stepper - A Material Design Lite Stepper component polyfill.
* @version v1.1.6
* @author Alexandre Thebaldi <ahlechandre@gmail.com>.
* @link https://github.com/ahlechandre/mdl-stepper
*
*/
/* Animation */
/* KEYFRAMES */
/* DISPLAY FLEX */
/* Shadows */
/**
* mdl-stepper - A Material Design Lite Stepper component polyfill.
* @version v1.1.6
* @author Alexandre Thebaldi <ahlechandre@gmail.com>.
* @link https://github.com/ahlechandre/mdl-stepper
*
*/
@-webkit-keyframes FadeIn {
0% {
opacity: 0; }
100% {
opacity: 100; } }
@-moz-keyframes FadeIn {
0% {
opacity: 0; }
100% {
opacity: 100; } }
@-o-keyframes FadeIn {
0% {
opacity: 0; }
100% {
opacity: 100; } }
@keyframes FadeIn {
0% {
opacity: 0; }
100% {
opacity: 100; } }
@-webkit-keyframes FadeInFromBottom {
0% {
height: 0;
padding-top: 84px;
background-color: white;
color: white; }
25% {
color: white; } }
@-moz-keyframes FadeInFromBottom {
0% {
height: 0;
padding-top: 84px;
background-color: white;
color: white; }
25% {
color: white; } }
@-o-keyframes FadeInFromBottom {
0% {
height: 0;
padding-top: 84px;
background-color: white;
color: white; }
25% {
color: white; } }
@keyframes FadeInFromBottom {
0% {
height: 0;
padding-top: 84px;
background-color: white;
color: white; }
25% {
color: white; } }
/* STEPPER */
.mdl-stepper {
position: relative;
font-family: "Roboto", sans-serif;
background-color: white;
display: block;
box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
padding: 24px 0;
max-width: 720px;
width: 100%;
border-radius: 2px; }
.mdl-stepper > li {
list-style: none; }
/* STEPPER ON SMALL SCREENS */
@media only screen and (max-width: 375px) {
.mdl-stepper {
width: 100vw; }
.mdl-grid .mdl-cell .mdl-stepper {
margin-left: -16px; } }
/* STEPPER VERTICAL ONLY */
.mdl-stepper:not(.mdl-stepper--horizontal) > .mdl-step:not(:last-child):after {
content: '';
position: absolute;
top: 50px;
left: 37px;
width: 1px;
height: calc(100% - 24px);
background-color: rgba(0, 0, 0, 0.1); }
.mdl-stepper:not(.mdl-stepper--horizontal) > .mdl-step:not(:last-child).is-active:after {
height: calc(100% - 12px); }
.mdl-stepper:not(.mdl-stepper--horizontal) .mdl-step__label:hover, .mdl-stepper:not(.mdl-stepper--horizontal) .mdl-step__label:active, .mdl-stepper:not(.mdl-stepper--horizontal) .mdl-step__label:focus {
background-color: rgba(0, 0, 0, 0.06); }
/* STEP */
.mdl-step {
position: relative;
height: 460px; }
.mdl-step:not(.is-active) {
height: initial !important; }
.mdl-step:not(:last-child) {
margin-bottom: 24px; }
.mdl-step:not(:last-child).is-active {
margin-bottom: 36px; }
.mdl-step .mdl-step-error-message {
display: none; }
.mdl-step > * {
-webkit-animation: FadeIn 0.5s ease-in-out;
-moz-animation: FadeIn 0.5s ease-in-out;
-ms-animation: FadeIn 0.5s ease-in-out;
animation: FadeIn 0.5s ease-in-out; }
/* STEP ACTIVE */
.mdl-step.is-active .mdl-step__title {
font-weight: bold; }
.mdl-step.is-active .mdl-step__content {
display: block; }
.mdl-step.is-active .mdl-step__label-indicator {
background-color: #2196F3;
color: white; }
.mdl-step.is-active .mdl-step__actions {
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
display: flex;
justify-content: flex-start; }
.mdl-step.is-active .mdl-step__actions [data-stepper-next] {
order: 1;
margin-right: 8px; }
.mdl-step.is-active .mdl-step__actions [data-stepper-cancel] {
order: 2; }
.mdl-step.is-active .mdl-step__actions [data-stepper-skip] {
order: 3;
margin-left: auto; }
.mdl-step.is-active .mdl-step__actions [data-stepper-back] {
order: 4;
margin-left: auto; }
/* STEP MOD COMPLETED */
.mdl-step--completed .mdl-step__label-indicator {
background-color: #2196F3; }
/* STEP MOD ERROR */
.mdl-step--error .mdl-step__title {
color: #F44336; }
.mdl-step--error .mdl-step-error-message {
display: block;
color: #F44336;
font-weight: normal; }
.mdl-step--error .mdl-step__label-indicator {
background-color: #F44336 !important;
font-weight: bold; }
/* STEP MOD OPTIONAL */
/* STEP MOD TRANSIENT */
.mdl-step--transient .mdl-step__content {
overflow: hidden !important; }
.mdl-step__label {
position: relative;
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
display: flex;
cursor: pointer;
margin-bottom: 8px;
padding: 12px 24px 24px 24px;
align-items: center; }
/* STEP LABEL MOD WITH SUBLABEL */
.mdl-step__label--with-sublabel {
align-items: baseline; }
/* STEP TITLE */
.mdl-step__title {
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
display: flex;
flex-flow: column nowrap;
order: 2;
width: 100%; }
/* STEP TITLE MESSAGE */
.mdl-step__title-message {
position: absolute;
font-size: 12px;
opacity: .7;
font-weight: 400;
top: 28px; }
/* STEP LABEL INDICATOR */
.mdl-step__label-indicator {
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
display: flex;
order: 1;
background-color: rgba(0, 0, 0, 0.3);
border-radius: 100%;
color: white;
margin-right: 12px;
margin-bottom: auto; }
.mdl-step__label-indicator > :first-child {
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
display: flex;
font-size: 15px;
width: 28px;
height: 28px;
align-items: center;
justify-content: center; }
/* STEP CONTENT */
.mdl-step__content {
display: none;
height: calc(100% - 132px);
width: inherit;
overflow: auto;
margin-left: 64px;
margin-right: 24px; }
/* STEP ACTIONS */
.mdl-step__actions {
display: none;
padding-top: 16px;
height: 48px;
margin-left: 64px;
margin-right: 24px; }
.mdl-step__actions [data-stepper-next].mdl-button--raised.mdl-button--colored {
background-color: #2196F3;
box-shadow: none; }
/* STEP TRANSIENT */
.mdl-step__transient {
position: absolute;
top: 72px;
left: 64px;
z-index: 2;
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
display: flex;
width: calc(100% - 88px);
height: calc(100% - 132px);
transition: 0.3s all ease-in-out; }
/* STEP TRANSIENT OVERLAY */
.mdl-step__transient-overlay {
content: '';
position: absolute;
z-index: 3;
width: 100%;
height: 100%;
top: 0;
background-color: rgba(255, 255, 255, 0.8); }
/* STEP TRANSIENT LOADER */
.mdl-step__transient-loader {
z-index: 4;
margin: auto; }
/* STEPPER MOD HORIZONTAL */
@media only screen and (min-width: 841px) {
.mdl-stepper--horizontal {
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
display: flex;
flex-direction: row;
align-items: baseline;
max-width: 840px;
padding: 0;
min-height: 576px;
/* HORIZONTAL STEP */
/* HORIZONTAL STEP LABEL */
/* HORIZONTAL STEP CONTENT */
/* HORIZONTAL STEP ACTIONS */
/* STEPPER MOD HORIZONTAL + MOD LINEAR */ }
.mdl-stepper--horizontal:before {
content: '';
background-color: transparent;
width: 100%;
min-height: 84px;
box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
position: absolute;
top: 0;
left: 0; }
.mdl-stepper--horizontal > .mdl-step {
position: static;
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
display: flex;
justify-content: center;
align-items: initial;
margin-top: 0 !important;
margin-bottom: 0 !important;
height: initial;
max-height: 84px;
overflow: hidden;
/* STEP MOD COMPLETED */ }
.mdl-stepper--horizontal > .mdl-step.is-active.mdl-step--transient:before {
content: attr(data-step-transient-message);
-webkit-animation: FadeInFromBottom 0.3s cubic-bezier(0, 0, 0, 0.99);
-moz-animation: FadeInFromBottom 0.3s cubic-bezier(0, 0, 0, 0.99);
-ms-animation: FadeInFromBottom 0.3s cubic-bezier(0, 0, 0, 0.99);
animation: FadeInFromBottom 0.3s cubic-bezier(0, 0, 0, 0.99);
position: absolute;
padding-left: 24px;
display: flex;
font-size: 16px;
justify-content: flex-start;
align-items: center;
width: calc(100% - 24px);
height: 84px;
background-color: white;
top: 0;
left: 0;
z-index: 9; }
.mdl-stepper--horizontal > .mdl-step .mdl-step__transient {
top: 0;
left: 0;
width: 100%;
height: 100%; }
.mdl-stepper--horizontal > .mdl-step:not(:first-child):not(:last-child) {
margin: auto auto; }
.mdl-stepper--horizontal > .mdl-step:not(:last-child) {
flex: 1; }
.mdl-stepper--horizontal > .mdl-step:not(:last-child):after {
content: '';
position: relative;
flex: 1;
top: 42px;
width: 168px;
margin-left: -12px;
height: 1px;
background-color: rgba(0, 0, 0, 0.1); }
.mdl-stepper--horizontal > .mdl-step.mdl-step--completed .mdl-step__title > .mdl-step__title-text {
font-weight: bold; }
.mdl-stepper--horizontal .mdl-step__label {
top: -48px;
flex: initial;
margin: 0;
padding: 24px;
min-height: 132px;
transition: 0.025s border-radius linear; }
.mdl-stepper--horizontal .mdl-step__label:hover {
background-color: rgba(0, 0, 0, 0.06); }
.mdl-stepper--horizontal .mdl-step__label:active {
padding: 12px;
margin: 12px;
border-radius: 100%; }
.mdl-stepper--horizontal .mdl-step__label > .mdl-step__title {
width: initial; }
.mdl-stepper--horizontal .mdl-step__label > .mdl-step__title > * {
max-width: 120px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; }
.mdl-stepper--horizontal .mdl-step__label > .mdl-step__title > .mdl-step__title-message {
position: relative;
top: 0;
line-height: 14px; }
.mdl-stepper--horizontal .mdl-step__label > .mdl-step__label-indicator {
margin-top: auto; }
.mdl-stepper--horizontal .mdl-step > .mdl-step__content {
position: absolute;
top: 84px;
left: 0;
width: calc(100% - 48px);
height: calc(100% - 192px);
margin: 24px; }
.mdl-stepper--horizontal .mdl-step > .mdl-step__actions {
position: absolute;
top: calc(100% - 84px);
left: 0;
margin: 0;
padding: 24px;
width: calc(100% - 48px); }
.mdl-stepper--horizontal .mdl-step > .mdl-step__actions [data-stepper-next] {
order: 4;
margin-left: 8px;
margin-right: 0;
color: #2196F3;
background-color: transparent; }
.mdl-stepper--horizontal .mdl-step > .mdl-step__actions [data-stepper-cancel] {
order: 3;
margin-left: auto; }
.mdl-stepper--horizontal .mdl-step > .mdl-step__actions [data-stepper-skip] {
order: 2;
margin-left: auto; }
.mdl-stepper--horizontal .mdl-step > .mdl-step__actions [data-stepper-back] {
order: 1;
margin-left: 0;
margin-right: auto; }
.mdl-stepper--horizontal.mdl-stepper--linear > .mdl-step:not(.mdl-step--completed):not(.is-active) .mdl-step__title > .mdl-step__title-text {
opacity: .5; } }
最佳答案
HTML 更改
/** remove inline css height and overflow it will enable scroll **/
<ul class="mdl-stepper mdl-stepper--linear mdl-stepper--horizontal" style="display:inline-block;"id="ipet-stepper">
<li class="mdl-step mdl-step--editable">
<span class="mdl-step__label">
<span class="mdl-step__title">
<span class="mdl-step__title-text">Your Information</span>
<span class="mdl-step__title-message">Edit this step later</span>
</span>
<span class="mdl-step__label-indicator"><span class="mdl-step__label-indicator-content">1</span>
</span>
</span>
/** remove inline css height and overflow it will enable scroll **/
<div class="mdl-step__content" style="display:inline-block;">
CSS 更改 添加高度属性以定义 mdl-stepper 类的高度
.mdl-stepper {
position: relative;
font-family: "Roboto", sans-serif;
background-color: white;
display: block;
box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
padding: 24px 0;
max-width: 720px;
width: 100%;
border-radius: 2px;
/**height property based on device screen height you could define it as required **/
height : 80vh;}
试验 mdl-stepper 和 mdl-step 的 css 高度以确定最终元素的外观和感觉。避免使用 !important
关于html - mdl-stepper 不响应溢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45117755/
这是一个非常基本的 Material Design Lite 问题,但这让我发疯了。在以下示例中来自 MDL examples website , 具有 mdl-layout-spacer 类的 di
每当我创建一个 mdl-card 时,它就会卡在 330px 宽,甚至当我分配类 mdl-cell mdl-cell--12-col 或 mdl-cell--8-col 或任何东西,它只是保持“mdl
我正在尝试使用 material-design-lite mdl-textfield在 mdl-menu 里面. 问题是,当我打开菜单并单击文本字段 ( ) 时,它会关闭菜单。 有谁知道如何在不手动
看似正常的 jQuery.validate 与 MDL 用例却出现了问题。请参阅this gist . 这工作正常: Without MDL 1 2 $(function
前一段时间,在 Apache Flex 项目中,我们已经开始将 MDL 库移植到 FlexJS 框架中。 [1] 当我在处理 Toast 组件时,我遇到了一个问题,即从 HTML 中删除“mdl-sn
如何设置 CSS 以更改此 Material Design Lite 标题的高度。 .mdl-layout__header{ margin: 0;
我们有一个旧版 AngularJS Web 应用程序,它使用 Material Design Lite UI 框架。 几天前,带有 mdl-button 和 mdl-js-ripple-effect
我尝试使用 hibernate 创建一对一映射并保存 SQL 数据库,但我运行我的项目时出现以下错误: Initial SessionFactory creation failed.org.hiber
MDL正在页面加载时升级其组件,因此 与 autofocus属性失去焦点。我想在 MDL 完成重新渲染后将焦点设置在此输入上。 我正在尝试监听某些页面准备就绪事件( codepen ): $('inp
我在让我的代码:( http://codepen.io/hoschiCZ/pen/rOJmmr) 工作时遇到问题。 The title doesn't matter
我正在使用 Google 刚刚发布的 Material Design Lite CSS/JS"template"将一些 Material Design 应用到我的 Angular 应用中,我注意到按钮
我正在使用 MDL - getmdl.io 版本 1.3.0 我在让日期表单域执行我想要的操作时遇到问题。它不仅显示标签字段,还显示默认的占位符 . 理想情况下,我不想展示这个。但是,如果必须的话,
在我的网站 ( Link )(通过 Google 运行 MDL)中,我遇到了一个恼人的问题,您可以在 #harule 选项卡消失之前看到它一会儿。该选项卡没有属性 is-active,并且应该隐藏在页
如下图所示,我的 MDL 开关未与其标签对齐。我尝试过的居中技术没有任何效果。它们是: margin: 0 auto display: inline-block与 text-align: center
嗨,我试图让以下代码显示在导航栏的右侧,但是当我这样做时,它只显示一半(换句话说,菜单的一半是正确的:-32px; - 我还没有添加任何 CSS(这是默认的 Material Design lite
当用户在 Chrome 或任何浏览器中从全屏转到窗口 View 时。主类 mdl-layout__content 似乎添加了一个垂直(上下)滚动条,这意味着现在用户屏幕的右侧有两个滚动条。 据我所知,
在我的网站上,我无法发布链接,因为这是一个受管理员/版主保护的目录,我正在运行 Google MDL,并且遇到了表单问题。 页面加载后,每个输入框和文本区域的底线都会变成红色,表示添加了类 is-in
我需要帮助来安排带有网格的 mdl 卡内的组件。我是网页设计的新手,有人可以帮忙解释一下如何安排。这里我创建了三张卡片,需要在三张卡片中放置切换开关。 thome | DashBoard
来自 getmdl.io/components/index.html#layout-section 我打开链接 https://codepen.io/anon/pen/MEoBqG 当我保存 html
我使用来自 https://getmdl.io/components/#dialog-section 的 Material Design Lite 创建了一个模态对话框.但我面临的问题是对话框外的区域
我是一名优秀的程序员,十分优秀!