zoukankan      html  css  js  c++  java
  • 四、Salesforce Styles_1

    1.静态变量的使用:<apex:stylesheet value="{!$Resource.TestStyles}"/>
    2.<apex:page>
    <style type="text/css">
    p { font-weight: bold; }
    </style>
    <p>This is some strong text!</p>
    </apex:page>
    3.css:h1 { color: #f00; }
        p { }
        newLink { color: #f60; font-weight: bold; }
    引用:<apex:page showHeader="false">
    <apex:stylesheet value="{!$Resource.customCSS}" />
    <h1>Testing Custom Stylesheets</h1>
    <p>This text could go on forever...<br/><br/>
    But it won't!</p>
    <apex:outputLink value="http://www.salesforce.com" styleClass="newLink">
    Click here to switch to www.salesforce.com
    </apex:outputLink>
    </apex:page>
    4.styleClass="asideText" 引用<style type="text/css">  .asideText { font-style: italic  </style>

    5.根据ID:<apex:page>
    <style type="text/css">
    [id*=myId] { font-weight: bold; }
    </style>
    <apex:outputText id="myId" value="This is way fancy !"/>
    </apex:page>
    6.判断浏览器:HTML Comments and IE Conditional Comments
    7.嵌入html 和 head :<apex:page showHeader="false" sidebar="false" standardStylesheets="false"
    applyHtmlTag="false" applyBodyTag="false" docType="html-5.0">
    <html>
    <body>
    <header>
    <h1>Congratulations!</h1>
    </header>
    <article>
    <p>This page looks almost like HTML5!</p>
    </article>
    </body>
    </html>
    </apex:page>
    8.当applyHtmlTag="false"时,其他元素是不好用的 ,除了红色标记

    <html>
    <apex:includeScript
    value="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"/>
    </html>
    9.Custom Doctype Example
    <apex:page docType="xhtml-1.0-strict" title="Strictly XHTML"
    showHeader="false" sidebar="false">
    <h1>This is Strict XHTML!</h1>
    <p>
    Remember to close your tags correctly:<br/>
    <apex:image url="/img/icon-person.gif" alt="Person icon"/>
    </p>
    </apex:page>
    10.Microsoft Excel ContentType Example
    contentType="application/vnd.ms-excel"
    11.Render a Visualforce Page as a PDF File
    <apex:page renderAs="pdf">


    此刻,静下心来学习
  • 相关阅读:
    Android笔记:数据储存
    Android笔记:管理所有活动
    Android随笔:属性
    Android笔记:限定符
    Android笔记:ninepatch
    Android笔记:获取屏幕信息
    js自动完成
    动态生成实体类
    EF框架学习手记
    js遮罩效果
  • 原文地址:https://www.cnblogs.com/bandariFang/p/5446030.html
Copyright © 2011-2022 走看看