简体   繁体   English

Salesforce 如何更改 pageBlockTable 的颜色

[英]Salesforce how to change the color for pageBlockTable

In VF I'm render a pdf file to print I want a table to show all the product in orderItem.在 VF 中,我正在渲染要打印的 pdf 文件,我想要一个表格来显示 orderItem 中的所有产品。 It work however it showing the hyperlink in blue how do I change the color I try everything I could think plug google search for weeks.它可以工作,但是它以蓝色显示超链接我如何更改颜色我尝试了我能想到的所有事情,插入谷歌搜索数周。

Here my code:这是我的代码:

 <apex:pageBlockTable style="width:100%; margin-top:2%;" value="{!orderItem}" var="product"> <apex:column value="{!product.Product2Id}"/> <apex:column value="{!product.Case__c}"/> <apex:column value="{!product.Each__c}"/> </apex:pageBlockTable>

If you want to change the default style, you may need to write your custom CSS with <style> tag before your pageBlockTable.如果要更改默认样式,则可能需要在 pageBlockTable 之前使用<style>标记编写自定义 CSS。

For the elements' id or class, use Developer console in your browser.对于元素的 id 或类,请在浏览器中使用开发人员控制台。

Your may refer to https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_styling_custom.htm您可以参考https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_styling_custom.htm

 .pbtb{ background-color:red; }
 <apex:pageBlockTable style="background-color:red;" style> test Record 1<br/> test Record 2<br/> test Record 3 </apex:pageBlockTable>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM