首页 > 解决方案 > 如何在 jQuery Mobile 中垂直居中这些导航图标?

问题描述

我想知道如何在他们的按钮中垂直居中这些图标。无论它们显示在什么设备上,我都希望它们垂直居中。谢谢!

#footer {

    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
}

#footerbuttons {
	height: 3vh;
	border: none;
}
<head>
    <title>Mobile</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--jQuery CDN Hosted Files-->
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
    <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>

<!-- PAGE 1 ---------------------------->
	<div data-role="page" id="school1">


		<div data-role="footer" id="footer" data-position="fixed">
		    <div data-role="navbar">
		        <ul>
		            <li><a href="#" id="footerbuttons" data-icon="mail" data-iconpos="notext" data-role="button"></a></li>
		            <li><a href="#" id="footerbuttons" data-icon="camera" data-iconpos="notext" data-role="button"></a></li>
		            <li><a href="#" id="footerbuttons" data-icon="heart" data-iconpos="notext" data-role="button"></a></li>
		        </ul>
		    </div>
		</div>

标签: jqueryjquery-mobilejquery-mobile-navbar

解决方案


推荐阅读