Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 离子3如何在自定义离子输入中垂直居中文本?_Css_Ionic Framework_Ionic2_Ionic3_Css Position - Fatal编程技术网

Css 离子3如何在自定义离子输入中垂直居中文本?

Css 离子3如何在自定义离子输入中垂直居中文本?,css,ionic-framework,ionic2,ionic3,css-position,Css,Ionic Framework,Ionic2,Ionic3,Css Position,您可以看到,在图像中,离子输入中的文本没有垂直居中。 标准离子输入稍微偏离中心,以便看起来更好 有办法解决这个问题吗 提前感谢:D 编辑:我的意思是垂直而不是水平:///strong> 编辑这是某人请求的代码,高度和字体大小在媒体查询中 .email, .pass { width: 75%; max-width: 500px; border: none; background-color: #CC6992; font-family: Rubik; font-weight: ligh

您可以看到,在图像中,离子输入中的文本没有垂直居中。 标准离子输入稍微偏离中心,以便看起来更好

有办法解决这个问题吗

提前感谢:D

编辑:我的意思是垂直而不是水平:///strong>

编辑这是某人请求的代码,高度和字体大小在媒体查询中

.email, .pass {
 width: 75%;
 max-width: 500px;
 border: none;
 background-color: #CC6992;
 font-family: Rubik;
 font-weight: lighter;
 color: #3C3C3C;
 border-radius: 5px;
 padding-left: 18px;
 margin: 0 auto;
}



::placeholder {
  font-family: Rubik;
} 

如果要将文本(水平:右和左)和占位符居中,请编辑本机输入类:

.text-input {
  text-align: center;
}
对于占位符:

.text-input::-webkit-input-placeholder {
  text-align: center;
}

.text-input:-moz-placeholder {
  text-align: center;
}

.text-input::-moz-placeholder {
  text-align: center;
}

.text-input:-ms-input-placeholder {
  text-align: center;
}
还要检查爱奥尼亚的属性,并尝试同时使用属性:
text center

在对垂直方向进行编辑后,您必须尝试以下操作:

display: flex !important;
justify-content: center !important;
align-items: center !important;
height: 100%;
我所做的是:

.vertical-align {    
    display: flex !important;
    align-content: center !important;
    align-items: center !important;
}

您可以删除
!重要信息
,我之所以在这里使用它们,是因为我有其他类进行了交互。

似乎它们使用了绝对定位的标签作为占位符,因此您必须调整它的
顶部
属性。您是指垂直居中吗?水平方向是左/右,垂直方向是上/下。@Joseph Webber是的!对不起,我会编辑它。非常感谢您让我知道。请添加代码,因为您已经更新了基本的ionic 3 cssOkay,我会这样做的。