Jquery mobile jquery移动自定义按钮
我正在尝试使用Jquery Mobile 1.2创建一个自定义按钮。显示“我的按钮”,但使用现有的自定义四舍五入默认按钮。我需要这样显示按钮。Jquery mobile jquery移动自定义按钮,jquery-mobile,Jquery Mobile,我正在尝试使用Jquery Mobile 1.2创建一个自定义按钮。显示“我的按钮”,但使用现有的自定义四舍五入默认按钮。我需要这样显示按钮。 #主页。我的按钮{ 背景图片:url('../images/icons/btn_panel.png')!重要; 宽度:307px; 高度:50px; 填充顶部:0px自动; } #主页.ui图标关于图标{ 边界半径:0px; 背景图像:url('../images/icons/about_up.png'); 背景色:rgba(0,0,0,0); 宽度
#主页。我的按钮{
背景图片:url('../images/icons/btn_panel.png')!重要;
宽度:307px;
高度:50px;
填充顶部:0px自动;
}
#主页.ui图标关于图标{
边界半径:0px;
背景图像:url('../images/icons/about_up.png');
背景色:rgba(0,0,0,0);
宽度:36px;
高度:36px;
}
这是一个好的开始,继续操作CSS。。。我调整了高度,因为填充,但饲料自由发挥自己周围
<style>
#homepage .my-button {
background-image: url("btn_panel.png");
width:307px;
height:75px;
padding-top:0px auto;
}
#homepage .my-button .ui-btn-inner {
padding-top: 25px;
}
#homepage .my-button .ui-btn-text {
left: -80px;
}
.ui-icon-about-icon {
border-radius:0px;
background-image: url("logo36.png");
background-color: rgba(0, 0, 0, 0);
width:36px;
height:36px;
}
</style>
我玩了一点左右,得出了这个结果(我没有你的图片,但使用了另一个…)
您还可以使用自定义CSS…这是一个很好的开始,只需继续操作CSS。。。我调整了高度,因为填充,但饲料自由发挥自己周围
<style>
#homepage .my-button {
background-image: url("btn_panel.png");
width:307px;
height:75px;
padding-top:0px auto;
}
#homepage .my-button .ui-btn-inner {
padding-top: 25px;
}
#homepage .my-button .ui-btn-text {
left: -80px;
}
.ui-icon-about-icon {
border-radius:0px;
background-image: url("logo36.png");
background-color: rgba(0, 0, 0, 0);
width:36px;
height:36px;
}
</style>
我玩了一点左右,得出了这个结果(我没有你的图片,但使用了另一个…)
您还可以使用自定义CSS…我将查看文档中的按钮:
- (宽度)
- (高度)
// this changes the height for all buttons
$('.ui-btn-text').css('font-size','50px');
// This changes the height for a single element
$('#hrefButton3').children().children().css('font-size','30px');
HTML:
相关的:
- (宽度)
- (高度)
// this changes the height for all buttons
$('.ui-btn-text').css('font-size','50px');
// This changes the height for a single element
$('#hrefButton3').children().children().css('font-size','30px');
HTML:
相关的:
,因为某些区域的数据角=“false”对我不起作用
在Jquery Mobile 1.2中可用吗
当然可以。。。再看一下这个片段a href=…
灰色边框只是背景,因为我在示例中使用了data-theme=“b”
。。。我建议您使用主题滚轮来定制您的CSS,正如前面提到的那样…谢谢,因为一些reaon data corners=“false”对我不起作用。它是否在jQueryMobile 1.2中可用,因为DW没有在代码提示中显示它。另外,是否可以删除关于图标周围的灰色边框?,因为某些区域的数据角=“false”对我不起作用
在Jquery Mobile 1.2中可用吗
当然可以。。。再看一下这个片段a href=…
灰色边框只是背景,因为我在示例中使用了data-theme=“b”
。。。我建议你使用主题滚轮来定制你的CSS,正如前面提到的。。。
// this changes the height for all buttons
$('.ui-btn-text').css('font-size','50px');
// This changes the height for a single element
$('#hrefButton3').children().children().css('font-size','30px');
<div data-role="page" id="home">
<div data-role="content">
<input type="button" id="theButton1" value="Press Me 1" />
<input type="button" id="theButton2" value="Press Me 2" />
<input type="button" id="theButton3" value="Press Me 3" />
<input type="button" id="theButton4" value="Press Me 4" />
<br />
<a href="#" data-role="button" id="hrefButton1">HREF Me 1</a>
<a href="#" data-role="button" id="hrefButton2">HREF Me 2</a>
<a href="#" data-role="button" id="hrefButton3">HREF Me 3</a>
<a href="#" data-role="button" id="hrefButton4">HREF Me 4</a>
</div>
</div>