开发者

DotNetOpenAuth OpenIdLogin CSS Style

I am using DotNetOpenAuth OpenIdLogin control, ho开发者_如何转开发w do I customize the style of the text? there is a "CSSClass" attribute, is there a sample css stylesheet that I can use?


There's no sample CSS, but it should be just basic CSS skills that apply here. Just look at View Source from a browser that displays the login page and then write CSS to that source code.

For instance, this source code might appear in your page:

<table border="0" class="SomeClassHere"> 
    <tr> 
        <td><label for="ctl00_Main_OpenIdLogin1">OpenID Login:</label></td><td><input class="openid_login" id="ctl00_Main_OpenIdLogin1" name="openid_identifier" type="text" size="40" value="" tabindex="1" style="background-image:url(/v3.4/OpenIdRelyingPartyWebForms/WebResource.axd?d=LnCnzE2WQ7q7aUGv8X6TNjah3P_-PFEyePI-hWeSWMeASOfcDs3anJ7vvEW24S1hjwNERBHhr7ZR9g2RKq9uqOmVP8N7qfKK5axsXh9SXyI1&amp;amp;t=634107001161499623);background-repeat:no-repeat;background-position:0 50%;padding-left:18px;border-style:solid;border-width:1px;border-color:lightgray;" /></td><td><input type="submit" name="ctl00$Main$loginButton" value="Login »" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$Main$loginButton&quot;, &quot;&quot;, true, &quot;OpenIdLogin&quot;, &quot;&quot;, false, false))" id="ctl00_Main_loginButton" tabindex="2" title="Account login" /></td> 
    </tr><tr> 
        <td></td><td style="color:gray;font-size:smaller;"><span id="ctl00_Main_ctl04" style="color:Red;display:none;">Provide an OpenID first.<br/></span><span id="ctl00_Main_ctl05" style="color:Red;display:none;">Invalid OpenID URL.<br/></span><span>Example:</span> <span style="font-weight:bold;">http://your.name.myopenid.com</span></td><td style="color:gray;font-size:smaller;text-align:center;"><a tabindex="4" title="Sign up free for an OpenID with MyOpenID now." href="https://www.myopenid.com/signup">register</a></td> 
    </tr><tr> 
        <td></td><td><input id="ctl00_Main_ctl10" type="checkbox" name="ctl00$Main$ctl10" tabindex="3" /><label for="ctl00_Main_ctl10">Remember me</label></td><td></td> 
    </tr> 
</table> 

So you should be able to style the text with something like:

.SomeClassHere, .SomeClassHere td { font-family: Arial; font-weight: bold; }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜