2
我有這樣的代碼顯示登錄Facebook的按鈕Facebook登錄按鈕樣式
<span style="float:right; height:40px; line-height:45px;vertical-align:top;
font-size:14px; padding-right:10px; "><?php if($this->tank_auth->is_logged_in())
{ echo "Welcome " .anchor('profile',$this->tank_auth->get_username())." | ".anchor
('profile/find_friends','Find Friends')." | ".anchor('auth/logout','Logout');}
else {?><?php echo anchor('auth/login','Login'); ?> |
<fb:login-button v="2" perms="" length="long"
onlogin='window.location="https://graph.facebook.com/oauth/authorize?client_id=<?php echo
$this->config->item('facebook_app_id'); ?>&redirect_uri=<?php echo site_ur
('auth_other/fb_signin'); ?>&r="+window.location.href;'></fb:login-button><?php } ?></span>
<div style="clear:both"></div>
這段代碼轉換成這個當我瀏覽網頁:
<fb:login-button v="2" perms="" length="long"
onlogin="window.location="https://graph.facebook.com/oauth/authorize?
client_id=372198139465874&
redirect_uri=http://allviralvideo.org/auth_other/fb_signin&r="+window.location.href;"
login_text="" class=" fb_iframe_widget" fb-xfbml-state="rendered" fb-iframe-plugin-
query="app_id=372198139465874&locale=en_US&sdk=joey">
**<span style="vertical-align: bottom; width: 69px; height: 22px; ">**<iframe
name="f1d6c3fee8" width="1000px" height="1000px" frameborder="0" allowtransparency="true"
scrolling="no" title="fb:login_button Facebook Social Plugin" style="border-top-style: none;
border-right-style: none; border-bottom-style: none; border-left-style: none; border-width:
initial; border-color: initial; width: 69px; height: 22px; visibility: visible; "
src="http://www.facebook.com/plugins/login_button.php?app_id=372198139465874&channel=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D28%23cb%3Df11db3306c%26domain%3Dallviralvideo.org%26origin%3Dhttp%253A%252F%252Fallviralvideo.org%252Ff72d2ade4%26relation%3Dparent.parent&locale=en_US&sdk=joey" class=""></iframe></span></fb:login-button>
我想刪除垂直對齊:底部;從大膽的部分。我添加了vertical-align:top;父母標籤,但它抑制了他們。有什麼辦法可以消除這種情況嗎?
我想removeClass()方法會幫助你,當你使用JavaScript。但是我不太瞭解JS。對不起...... =( –
我使用這些,但什麼都沒有改變: <腳本類型= 「文/ JavaScript的」>我添加了vertical-align:top!important;對於fb:login-button:span'); removeAttr('style'); }; –
按鈕,謝謝大家。 –