-1

以下は画像です。画像にテキストがあります。画像のテキストをどのように変更できるのか疑問に思っています。実際、他の誰かがコードを書いたのですが、私は取得していません。友達を助けてください。 ここに画像の説明を入力してください

そして、これはこれに取り組んでいるコードです。

    <div class="TabsV">
        <div id="Tab0" class="TabV Selected" style="height: 86px;">
            <a style="background-position: -8px -12px; padding-bottom: 70px;" href="javascript: SelectTab(0)"></a>
        </div>
        <div id="Tab1" class="TabV" style="height: 116px;">
            <a style="background-position: -40px 0px; padding-bottom: 100px;" href="javascript: SelectTab(1)"></a>
        </div>
        <div class="TabVEmpty" style="height: 50px;"></div>
    </div>
4

3 に答える 3

1

It looks like the text is part of the image.

So you need to edit the actual images and change the text there.

If you look at the stylesheet used in that page you will find something similar to

.TabV a{
   /*in here you will see the url of the image being used
   background:...
   or background-image: url('..');
   */
}
于 2012-11-20T10:59:55.063 に答える
1

画像自体にテキストが含まれているように見え、TabVクラスを介して適用されます。背景位置の座標がタブ間でどのように変化するかに注意してください。

CSSファイルを見ると、次のようになっているはずです。

.TabV 
{
    background-image: url(...)
}

したがって、あなたがする必要があるのは、背景として使用されている既存の画像を操作し、その画像に必要なテキストを追加することです。次に、対応するアンカー要素の背景位置を変更する必要があります。jQueryでそれを行う1つの方法は次のとおりです。

$('#Tab0').attr("background-position","-16px 20px;"); //-16px and 20px are just an example

#Tab0最初のタブのcssセレクターはどこにありますか。#Tab1は、2番目のタブのcssセレクターになります... htmlマークアップに"#<something>"マップされます。id="<something>"

この手法自体はCSSスプライトと呼ばれます。このテクニックの詳細については、こちらをご覧ください

于 2012-11-20T11:05:00.020 に答える
0

You can not! You must edit those image files in an image editor. The text from the tabs isn't coded in the html code.

于 2012-11-20T10:58:23.110 に答える