Skip to content

Instantly share code, notes, and snippets.

@tyoshikawa1106
Last active August 29, 2015 14:08
Show Gist options
  • Save tyoshikawa1106/4b586cd69d10bd59dfa7 to your computer and use it in GitHub Desktop.
Save tyoshikawa1106/4b586cd69d10bd59dfa7 to your computer and use it in GitHub Desktop.
SFDC:標準テーブルマウスオーバーCSSサンプル
<apex:page standardController="Account" recordSetVar="accounts" id="page">
<style>
.customTable tr.dataRow.highlight td {
background-color: red !important;
}
</style>
<div id="vf-page">
<apex:form id="form">
<apex:pageBlock id="block">
<apex:pageBlockSection columns="1" id="blockSection">
<apex:outputPanel styleClass="customTable">
<apex:pageBlockTable value="{!accounts}" var="item" id="blockTable">
<apex:column style="background-color: blue; color: white;" headerValue="{!$ObjectType.Account.Fields.Name.Label}" >
<apex:outputField value="{!item.Name}" />
</apex:column>
<apex:column headerValue="{!$ObjectType.Account.Fields.AccountNumber.Label}" >
<apex:outputField value="{!item.AccountNumber}" />
</apex:column>
</apex:pageBlockTable>
</apex:outputPanel>
<apex:pageBlockTable value="{!accounts}" var="item">
<apex:column headerValue="{!$ObjectType.Account.Fields.Name.Label}" >
<apex:outputField value="{!item.Name}" />
</apex:column>
<apex:column headerValue="{!$ObjectType.Account.Fields.AccountNumber.Label}" >
<apex:outputField value="{!item.AccountNumber}" />
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</div>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment