我注意到在我的iOS应用程序中,对于使用大小为20磅或更大的系统字体的文本,文本底部被切断.
例如,字母y,g,p和g的底部被切掉.
如何在Xcode中修复此问题?
我有一个常见问题的手风琴。每个问题的类名称为 q,id 为 q1 或 q2 或 q3。每个答案都有一个类名 a。
当 url 有锚标签 /faq#q2 时,我希望触发 q2。我有下面的代码,但它不起作用。
我认为导致它不起作用的那一行是: if (hash) $(.q[id$="+hash+"]).trigger('click'); 但我不知道出了什么问题。
$(document).ready(function($) {
$(".a").hide().first().show();
$(".q:first").addClass("active");
$('#accordion').find('.q').click(function(){
//Expand or collapse this panel
$(this).next().slideToggle('fast');
//Hide the other panels
$(".a").not($(this).next()).slideUp('fast');
//Find anchor hash and open
var hash = $.trim( window.location.hash );
if (hash) $(.q[id$="+hash+"]).trigger('click');
});
});Run Code Online (Sandbox Code Playgroud)
.q {cursor: pointer;}
.a {display: none;}
.q.active + .accordion-content {
display: block;
}Run Code Online (Sandbox Code Playgroud)
<div id="accordion">
<h4 class="q" id="q1">Accordion 1</h4>
<div class="a">
<p>Cras malesuada ultrices augue <a href="#q2" onclick="setTimeout('history.go(0);',800);">Open …Run Code Online (Sandbox Code Playgroud)