我的目标很简单,我只想修改Title=“新”到更大的尺寸和颜色,我确实申请了CSS,但它不起作用:(
<style type="text/css">
#g_523a7cea_3249_4ac1_b2bc_48efea016ad1
{
color: Blue;
}
</style>
<WebPartPages:DataFormWebPart runat="server"
Description="" ListDisplayName="" PartOrder="2"
Default="FALSE" HelpLink="" AllowRemove="True" IsVisible="True"
AllowHide="True" UseSQLDataSourcePaging="True" ExportControlledProperties="True"
DataSourceID="" Title="News" ViewFlag="8" NoDefaultStyle="TRUE" AllowConnect="True"
DisplayName="Employee News" PageType="PAGE_DISPLAYFORM" FrameState="Normal"
PageSize="-1" PartImageLarge="" AsyncRefresh="False" ExportMode="All" Dir="Default"
DetailLink="" ShowWithSampleData="False" ListId="645a16cc-7fe6-4247-9800-2170e1479074"
ListName="{645A16CC-7FE6-4247-9800-2170E1479074}" FrameType="Default" PartImageSmall=""
IsIncluded="True" SuppressWebPartChrome="False" AllowEdit="True" ManualRefresh="False"
AutoRefresh="False" AutoRefreshInterval="60" AllowMinimize="True" ViewContentTypeId=""
InitialAsyncDataFetch="False" CssStyleSheet="" MissingAssembly="Cannot import this Web Part."
HelpMode="Modeless" ListUrl="" ID="g_523a7cea_3249_4ac1_b2bc_48efea016ad1"
ConnectionID="00000000-0000-0000-0000-000000000000" AllowZoneChange="True"
IsIncludedFilter="" __MarkupType="vsattributemarkup" __WebPartId="{A7755E5E-BE3F-4415-A163-BAA925625A0E}"
__AllowXSLTEditing="true" WebPart="true" Height="" Width="">发布于 2013-04-04 15:00:02
此ID用于DVWP。有没有风格,你可以一举应用到整个DVWP。在DVWP中,会有许多其他的CSS类用于不同的元素,它们将被应用,覆盖任何东西,即使你可以使用一个CSS格式的网页部件ID。
DVWP通常显示在表中。TH、TR、TD等有不同的类和样式。如果您想要更改外观,则需要处理表元素的这些类。
发布于 2013-04-04 09:35:45
用样式替换脚本。脚本是用于javascript的。样式适用于css
<style type='text/css'> ... </style>发布于 2013-04-04 09:51:16
呈现页面并查看HTML代码中的ID,然后应用CSS。我几乎可以肯定ID是不同的,这就是它不工作的原因(几乎所有地方都会发生,在使用web控件的地方,特别是在ASP中)。
https://stackoverflow.com/questions/15801096
复制相似问题