1

Input TextBox の背景色を指定しようとしています。インライン スタイルを使用すると、フィールドに色が付きます。背景色を変更するにはどうすればよいですか。

以下は私のコードです:

 <?xml version="1.0" encoding="UTF-8" ?>
<amx:view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amx="http://xmlns.oracle.com/adf/mf/amx"
      xmlns:dvtm="http://xmlns.oracle.com/adf/mf/amx/dvt">
<amx:panelPage id="pp1">
<amx:facet name="header">
  <amx:outputText value="Header" id="ot1"/>
</amx:facet>
<amx:inputText label="Name" id="it1"  inlineStyle="background-color:blue;"
  value="#{preferenceScope.feature.feature1.security.username}"/>
  <amx:inputText label="Password" id="it2"
  value="#{preferenceScope.feature.feature1.security.password}"/>
  <amx:inputText label="URL" id="it3" value="#{preferenceScope.feature.feature1.security.url}"/>
</amx:panelPage>
</amx:view>  

以下は出力です:

ここに画像の説明を入力

4

1 に答える 1

2

CSS ファイル (new => html => css ファイル) を作成し、以下のコードを追加します。

   .textcolor input{
        background-color:Blue !important;
    }

入力テキストStyle Classプロパティ書き込みtextcolor(css ファイルに追加したばかりのクラス) で。

次に、adfmf-feature.xml を開き、作成した css ファイルを含むコンテンツ タブで機能を選択します。

それでおしまい。

于 2014-06-12T19:46:13.970 に答える