gpt4 book ai didi

html - 输入 css 不工作

转载 作者:行者123 更新时间:2023-11-28 00:17:04 28 4
gpt4 key购买 nike

我使用 JSF 2.0 创建了一个页面。以下是我的内容

<h:dataTable id="patentDetailsList" value="#{PersonalInformationDataBean.getAllPatentInfo()}"
var="patentInfo" bgcolor="#F1F1F1" border="8" cellpadding="5"
cellspacing="3" width="100%">
<f:facet name="header">
<h:outputText value="Patent Information" />
</f:facet>

<h:column>
<f:facet name="header">
<h:outputText value="ID" />
</f:facet>
<h:outputText value="#{patentInfo.personalInfoId}"/>
</h:column>

<h:column>
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:commandLink value="#{patentInfo.fullName}" action="#{PersonalInformationDataBean.takeMeToAnotherPage('patentss')}">
<f:setPropertyActionListener target="#{PersonalInformationDataBean.personalInfoId}" value="#{patentInfo.personalInfoId}" />
</h:commandLink>
</h:column>

<h:column>
<f:facet name="header">
<h:outputText value="Email ID" />
</f:facet>
<h:outputText value="#{patentInfo.emailID}"/>
</h:column>

<h:column>
<f:facet name="header">
<h:outputText value="Mobile Number" />
</f:facet>
<h:outputText value="#{patentInfo.mobileNumber}"/>
</h:column>

<h:column>
<f:facet name="header">
<h:outputText value="Action" />
</f:facet>
<h:commandButton value="Edit" action="#{PersonalInformationDataBean.setEditPersonalInfo()}" onclick="return confirm('Are you sure you want to edit?')">
<f:setPropertyActionListener target="#{PersonalInformationDataBean.personalInfoId}" value="#{patentInfo.personalInfoId}" />
</h:commandButton>
<h:commandButton value="Delete" action="#{PersonalInformationDataBean.deletePersonalInfo()}" onclick="return confirm('Are you sure you want to delete?')">
<f:setPropertyActionListener target="#{PersonalInformationDataBean.personalInfoId}" value="#{patentInfo.personalInfoId}" />
</h:commandButton>
</h:column>
</dataTable>

在CSS中,我有

body {
font-family: verdana, 'Times New Roman';
font-size: 15px;
}

a {
font-family: verdana, 'Times New Roman';
font-size: 15px;
}

input {
font-family: verdana, 'Times New Roman';
font-size: 15px;
}

让 MAD 变得疯狂的是,字体和大小被应用到所有文本和链接 EXCEPT 按钮。编辑和删除按钮不会像其他按钮一样出现。

知道我做错了什么吗?

我知道 使用 styleClass 我可以做到这一点,但是如果我使用 styleClass 我会必须写更多工作的每个地方。

更新1

生成的 HTML 是

<table id="patentDetailsList" bgcolor="#F1F1F1" border="8" cellpadding="5" cellspacing="3" width="100%">
<thead>
<tr><th colspan="5" scope="colgroup">Patent Information</th></tr>
<tr>
<th scope="col">ID</th>
<th scope="col">Name</th>
<th scope="col">Email ID</th>
<th scope="col">Mobile Number</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt65'),{'patentDetailsList:0:j_idt71':'patentDetailsList:0:j_idt71'},'');return false">Fahim Parkar</a></td>
<td>parkarfahim22@yahoo.co.in</td>
<td>66991234</td>
<td><input type="submit" name="patentDetailsList:0:j_idt75" value="Edit" onclick="return confirm('Are you sure you want to edit?')" /><input type="submit" name="patentDetailsList:0:j_idt76" value="Delete" onclick="return confirm('Are you sure you want to delete?')" /></td>
</tr>
<tr>
<td>2</td>
<td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt65'),{'patentDetailsList:1:j_idt71':'patentDetailsList:1:j_idt71'},'');return false">Fahad Parkar</a></td>
<td>parkarfahad7@gmail.com</td>
<td>88888888</td>
<td><input type="submit" name="patentDetailsList:1:j_idt75" value="Edit" onclick="return confirm('Are you sure you want to edit?')" /><input type="submit" name="patentDetailsList:1:j_idt76" value="Delete" onclick="return confirm('Are you sure you want to delete?')" /></td>
</tr>
<tr>
<td>3</td>
<td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt65'),{'patentDetailsList:2:j_idt71':'patentDetailsList:2:j_idt71'},'');return false">Patent First</a></td>
<td>patent@yahoo.com</td>
<td>66991234</td>
<td><input type="submit" name="patentDetailsList:2:j_idt75" value="Edit" onclick="return confirm('Are you sure you want to edit?')" /><input type="submit" name="patentDetailsList:2:j_idt76" value="Delete" onclick="return confirm('Are you sure you want to delete?')" /></td>
</tr>
</tbody>
</table>

最佳答案

试试这个

input[type=submit] {
/*Your CSS Goes Here*/
}

/*For text+submit*/
input[type=submit], input[type=text] {
/*Your CSS Goes Here*/
}

/*For Textarea*/

textarea { /*For All Text Area*/
/* CSS Goes Here */
}

textarea.only_one_textarea { /*This will apply to thextarea with class .only_one_textarea. See ref 1*/
/* CSS Goes Here */
}

<!--Ref 1-->
<textarea class="only_one_textarea"></textarea>

关于html - 输入 css 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11591787/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com