-3

我知道我的问题可能很烦人,因为我在问一些对你来说很容易的事情,当然我可以自己检查,但这对我来说太难了。我可以找到 div 的宽度和高度,找到背景颜色和字体,但我找不到代码来做你可以在这里找到的事情:http: //easyelo.com/ 在常见问题解答中,靠近底部在页面上,单击>>它会显示带有说明的附加文本。我不知道如何检查它在哪里执行此操作。有人能帮助我吗?

<div class="more" style="font-family: arial; margin-bottom: 10px; margin-top: 10px; display: block;">
                <i style="line-height: 20px; font-size: 15px;font-family:arial;">Sorry, we don’t do any jobs until they are paid for; however, we do allow you to pay in increments as small as 10 euro. </i>
                </div>
4

1 回答 1

3

Here's an easy solution:

Use the following code to create the elements:

<div id="mainLine">The immediately visible part of the thing here. <a href="#" id="more">>></a>
<p id="hiddenText">This thing appears and disappears as you click the '>>' at the end.</p>

And use this jQuery script to hide the element when the page loads and then display it only when the '>>' is clicked:

$(document).ready(function(){
$("#hiddenText").hide();});

$(document).ready(function(){
$("#more").click(function(){
    $("#hiddenText").slideToggle("slow"); }
                 );
});

And if you are interested, here is the CSS that removes the underline from the '>>':

a
{
 text-decoration: none; /* I'm trying to make it look more like the original */
 }

You can find a working example at http://jsfiddle.net/2b7Vp/

This is my first answer on SO & I hope this helps you (partly stolen from @Pavel Sterba's comment. Thanks!).

于 2013-03-26T16:33:16.223 回答