我是 php 开发人员。我使用 php hawhaw.inc 开发了一个移动网站。
我使用页面 sim 为我的页面设置 css
作为
$myPage->use_simulator("http://".$_SERVER["SERVER_NAME"].":".$_SERVER['SERVER_PORT'].dirname($_SERVER['PHP_SELF'])."/css/style.css")
我是我的 css 文件,我为表格编写 css。它在 windows mobile 中设置,但在 opera mini 和 black berry 浏览器中没有设置。
该页面是
$myPage = new HAW_deck("Login ", HAW_ALIGN_CENTER);
/*$myPage->set_bgcolor('#337fa6');
$myPage->set_background('../images/body_bg.jpg');
$myPage->set_css_class('skin');*/
$myHtmlCode = '<link href="css/style.css" rel="stylesheet" type="text/css" media="handheld" /><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="viewport" content="initial-scale=1.0"/><meta name="viewport" content="user-scalable=false" />';
$myAdblock = new HAW_raw(HAW_HTML, $myHtmlCode);
$myPage->add_raw($myAdblock);
/*$myPage->set_width('50%');
$myPage->set_height('50%');*/
$myPage->use_simulator("http://".$_SERVER["SERVER_NAME"].":".$_SERVER['SERVER_PORT'].dirname($_SERVER['PHP_SELF'])."/css/style.css");
$myForm = new HAW_form($_SERVER['PHP_SELF']);
$text = new HAW_text("Please enter username & password:");
$text1 = new HAW_text("REMcloud", HAW_TEXTFORMAT_BOLD | HAW_TEXTFORMAT_BIG);
$myImage1 = new HAW_image('','../images/logo.png','REMcloud','');
$myImage1->set_br(1);
$myImage1->set_html_width(200);
$myImage1->set_html_height(100);
$error=new HAW_text($_REQUEST['msg'], HAW_TEXTFORMAT_BOLD);
$error->set_color("#ff0000", "red");
$theID = new HAW_input("username", "", "Username", "*N");
$theID->set_size(4);
$theID->set_maxlength(20);
$text2 = new HAW_text("");
$thePW = new HAW_input("password", "", "Password", "*N");
$thePW->set_size(4);
$thePW->set_maxlength(20);
$thePW->set_type(HAW_INPUT_PASSWORD);
$theSubmission = new HAW_submit("Submit", "submit");
// add the elements in the form
//$myForm->add_text($text1);
$myForm->add_image($myImage1);
//$myForm->add_text($text2);
$myForm->add_text($error);
$myForm->add_text($text2);
$myForm->add_text($text);
$myForm->add_text($text2);
$myForm->add_input($theID);
$myForm->add_text($text2);
$myForm->add_input($thePW);
$myForm->add_text($text2);
$myForm->add_submit($theSubmission);
$myPage->add_form($myForm);
$myPage->create_page();
CSS是
/* HAWHAW skin stylesheet for the hawhaw phone */
body {
background-color: #FFFFFF;
text-align: center;
margin: 0px;
padding: 0px;
color: #222222;
}
#skin {
margin: 0px auto;
padding: 0px;
text-align: left;
width: 280px;
height: 466px;
background-image: url(../../images/bg.jpg);
background-color:#337fa6;
background-repeat:repeat-x;
}
#display {
position: relative;
top: 80px;
/* left: 43px;*/
width: 100%;
height: 85%;
overflow: auto;
}
TABLE{
width:100%;
padding-left:-10px;
overflow:scroll;
height:20px;
border:none;
font-family:Calibri;
font-size:14px;
}
tr{
height:20px;
}
td{
color:#fff;
border:none;
}
a
{
font-family:Calibri;
font-size:16px;
}
如果有人知道,请给我同样的建议
提前致谢