わかりません、またBOMの頭ですか? _html/css_WEB-ITnose
html css utf8
よく見ると、ログイン名とパスワードの入力フィールドが片側に長くないことがわかります。ドロップダウン メニューの前にスペースがあるのはなぜですか? (添付コード)
<style type="text/css">body{font:12px Arial, Helvetica, sans-serif; color: #000; background-color: #EEF2FB; margin: 0px; }</style><link href="../css/skin.css" rel="stylesheet" type="text/css" /><body><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="17" height="29" valign="top" background="../images/mail_leftbg.gif"><img src="../images/left-top-right.gif" width="17" height="29" /></td> <td valign="top" background="../images/content-bg.gif"> <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2"> <tr><td height="31"><div class="titlebt">用户管理</div></td></tr> </table></td> <td width="16" valign="top" background="../images/mail_rightbg.gif"><img src="../images/nav-right-bg.gif" width="16" height="29" /></td> </tr> <tr> <form method="POST" name="frmAdd" action=<?php echo $_SERVER['PHP_SELF'];?>> <td height="71" valign="middle" background="../images/mail_leftbg.gif"> </td> <td valign="top" bgcolor="#F7F8F9"> <table width="100%" height="138" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr><td class="left_txt">当前位置:用户管理 >> 添加用户</td></tr> <tr><td height="20"><table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC"> <tr> <td> </td> </tr></table></td></tr> <tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0"> </table></td></tr> <tr><td> </td></tr> <tr> <td><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="nowtable"> <tr><td class="left_bt2"> 添加新用户</td></tr></table> <tr> <?php include("../BOM.php"); ?> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="20%" height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">登录名:</td> <td width="3%" bgcolor="#f2f2f2"> </td> <td width="32%" height="30" bgcolor="#f2f2f2"><input type="test" name="LoginName" value="" size="30" /></td> <td width="45%" height="30" bgcolor="#f2f2f2" class="left_txt">登录账号信息</td> </tr> <tr> <td height="30" align="right" class="left_txt2">密码:</td> <td> </td> <td height="30"><input type="password" name="Password" value="" size="30" /></td> <td height="30" class="left_txt">登录密码信息</td> </tr> <tr> <td height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">用户角色:</td> <td bgcolor="#f2f2f2"> </td> <td height="30" bgcolor="#f2f2f2"><?php include("../RoleSelect.php");?></td> <td height="30" bgcolor="#f2f2f2" class="left_txt">用户角色信息</td> </tr></table></td> </tr></td></tr></table></td> </tr> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><td height="30" colspan="3"> </td></tr> <tr> <td width="50%" height="30" align="right"><input type="submit" name="btnAdd" value=" 确定 " /></td> <td width="6%" height="30" align="right"> </td> <td width="44%" height="30"><input type="reset" value=" 重写 " name="cancel" /></td> </tr> <tr><td height="30" colspan="3"> </td></tr> </table> <td background="../images/mail_rightbg.gif"> </td> <tr> <td valign="middle" background="../images/mail_leftbg.gif"><img src="../images/buttom_left2.gif" width="17" height="17" /></td> <td height="17" valign="top" background="../images/buttom_bgs.gif"><img src="../images/buttom_bgs.gif" width="17" height="17" /></td> <td background="..//mail_rightbg.gif"><img src="../images/buttom_right2.gif" width="16" height="17" /></td> </tr></table></td></form> </tr></table></body>
@charset "utf8";.login_top_bg { background-image: url(../images/login-top-bg.gif); background-repeat: repeat-x;}.body { background-color: #EEF2FB; left: 0px; top: 0px; right: 0px; bottom: 0px;}.login-buttom-bg { background-image: url(../images/login-buttom-bg.gif); background-repeat: repeat-x;}.login-buttom-txt { font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #ABCAD3; text-decoration: none; line-height: 20px;}.login_txt { font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 25px; color: #333333;}.Submit { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #629DAE; text-decoration: none; background-image: url(../images/Submit_bg.gif); background-repeat: repeat-x;}.login_bg { background-image: url(../images/login_bg.jpg); background-repeat: repeat-x;}.login_bg2 { background-image: url(../images/login-content-bg.gif); background-repeat: no-repeat; background-position: right;}.admin_txt { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; text-decoration: none; height: 38px; width: 100%; line-height: 38px;}.login_txt_bt { font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 25px; color: #666666; font-weight: bold;}.admin_topbg { background-image: url(../images/top-right.gif); background-repeat: repeat-x;}.txt_bt { font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 25px; font-weight: bold; color: #000000; text-decoration: none;}.left_topbg { background-image: url(../images/content-bg.gif); background-repeat: repeat-x;}.admin_toptxt { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #4A8091; height: 18px; width: 100%; overflow: hidden; position: fixed;}.left_bt { font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; color: #395a7b;}.left_bt2 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 25px; font-weight: bold; color: #333333;}.titlebt { font-size: 12px; line-height: 26px; font-weight: bold; color: #000000; background-image: url(../images/top_bt.jpg); background-repeat: no-repeat; display: block; text-indent: 15px; padding-top: 5px;}.left_txt { font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 25px; color: #666666;}.left_txt2 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 25px; color: #000000;}.view_title { font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 25px; color: #666666; text-align: center;}.view_list { font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 25px; color: #000000; text-align: center;}.view_page { font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; line-height: 25px; color: #191964; text-align: center;}.view_checkbox { font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 25px; color: #000000; text-align: left;}.nowtable { background-color: #e1e5ee; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-top-color: #bfc4ca; border-right-color: #bfc4ca; border-bottom-color: #bfc4ca; border-left-color: #bfc4ca;}.left_txt3 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 25px; color: #003366; text-decoration: none;}.left_ts { font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 25px; font-weight: bold; color: #FF6600;}.line_table { border: 1px solid #CCCCCC;}.sec1 { CURSOR: hand; COLOR: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 25px; border: 1px solid #B5D0D9; background-image: url(../images/right_smbg.jpg); background-repeat: repeat-x;}.sec2 { FONT-WEIGHT: bold; CURSOR: hand; COLOR: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 25px; background-color: #e2e7ed; border: 1px solid #e2e7ed;}.main_tab { COLOR: #000000; BACKGROUND-COLOR: #e2e7ed; border: 1px solid #e2e7ed;}.MM a { font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 26px; color: #666666; background-image: url(../images/menu_bg.gif); background-repeat: no-repeat; list-style-type: none; list-style-image: none;}a:link { font-size: 12px; line-height: 25px; color: #333333; text-decoration: none;}a:hover { font-size: 12px; line-height: 25px; color: #666666; text-decoration: none;}a:visited { font-size: 12px; line-height: 25px; color: #333333; text-decoration: none;}.MM a:link { font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 26px; color: #666666; background-image: url(../images/menu_bg.gif); background-repeat: no-repeat; list-style-type: none; list-style-image: none;}
ディスカッションへの返信 (解決策)
これは、Chrome では発生しませんか? テストした結果、IE9 と FF では発生しませんが、Chrome では発生します。この場合、Chrome ブラウザは type=password のスタイルを自動的にロードするはずです:
input:not([type]), input[type="color"], input[type="email"], input[type = "番号"], input[type="パスワード"], input[type="tel"], input[type="url"], input[type="text"] {
パディング: 1px
}
;
パスワードでない場合は、別のスタイルが自動的にロードされます:
input, input[type="password"], input[type="search"], isindex {
-webkit-Appearance: textfield;
padding: 1px; 。 。 。 。 。 。 。
}
こうやって長短が出てきます。
input:not([type ])、input[type="color"]、input[type="email"]、input[type="number"]、input[type="password"]、input[type= "tel"]、input[ type="url"], input[type="text"] {
padding: 1px 0px;
}
そして、パスワードでない場合は、別のスタイルが自動的にロードされます:
input, input[type="password"] 、input[type="search"]、isindex {
-webkit-Appearance: テキストフィールド;
パディング: 1px; 。 。 。 。 。 。
}
こうやって長短が出てきます。
IE6とChromeを使用してテストしました。 。 。
padding: 1px 0px;
}
そして、パスワードでない場合は、別のスタイルが自動的にロードされます:
input, input [type="password" ]、input[type="search"]、isindex {
-webkit-Appearance: テキストフィールド;
パディング: 1px; 。 。 。 。 。 。
}
こうやって長短が出てきます。
IE6とChromeを使用してテストしました。 。 。
"":padding:1px; にスタイルを追加するだけです。少なくとも Chrome では正常に動作しますが、IE6 では動作しません。ここではシミュレーションできません。
"":padding: 1px; のスタイルを追加するだけです。少なくとも Chrome では正常に動作しますが、IE6 では問題なく動作します。うーん、ここではシミュレーションできません。
いいえ、追加すると両側が不均一になります。そして、主な問題はドロップダウン ボックスが空すぎることです。
1. その入力にクラスを追加します ""
2. CSS ファイルを追加します:
padding: 1px;
Chrome で正常にテストされました。これは長期的な解決策です。
3. ドロップダウン ボックスに HTML コードを投稿すると、投稿した内容は PHP ファイルをインポートしました。
这样加:
1.那个input加个class “”
2.在css文件中加:
.in-password {
padding: 1px;
}
在chrome中测试成功。这个是解决长短不一的。
3.你那个下拉框把html代码贴出来,你贴出来的是引入了个PHP文件。
我是这样加的啊,也是chrome。。。效果就是相对于上面的框移到了中间位置,结果两边都多出来一点点
<!--RoleSelect.php:用户角色下拉框---------------><?php include_once("RoleClass.php"); //利用Role类的InitData()读取用户角色信息 $Role=new Role(); $roleid=$Role->RolePri($_SESSION["ss_user_id"]); //循环将用户角色写入下拉框选项中 echo "<select name=RoleSelect>"; foreach($Role->mInforArray as $item) { echo "<option value=".$item->RoleId.">".$item->RoleName."</option>"; } echo "</select>"?>
<!--RoleClass.php:状态类---------------------------------><?phpclass Role{ var $mInforArray; //状态基本信息数组 var $pRoleId=0; var $mRoleArray;/********************************************* 函数: InitData功能: 获取公文状态的基本信息,放入数组mInforArray中输入参数: ***********************************************/ function GetRoleIdFromUserId($pUserId){ require("sys_conf.inc"); require_once("DataBase.php"); $db=new DataBase($DBHOST,$DBUSER,$DBPWD,$DBNAME); //获取权限信息 $db->SqlString="select * from user"; $db->SqlString=$db->SqlString." where UserId=$pUserId "; $db->Query(); $this->mRoleArray=$db->mResultArray; $this->pRoleId= $this->mRoleArray[0]->RoleId; $db->__destruct();}function RolePri($pUserId){ require("sys_conf.inc"); require_once("DataBase.php"); $db=new DataBase($DBHOST,$DBUSER,$DBPWD,$DBNAME); $this->GetRoleIdFromUserId($pUserId); //获取基本信息 $db->SqlString="select * from role where RoleId < $this->pRoleId"; $db->Query(); $this->mInforArray=$db->mResultArray; $db->__destruct(); }}?>
这样加:
1.那个input加个class “”
2.在css文件中加:
.in-password {
padding: 1px;
}
在chrome中测试成功。这个是解决长短不一的。
3.你那个下拉框把html代码贴出来,你贴出来的是引入了个PHP文件。
我是这样加的啊,也是chrome。。。效果就是相对于上面的框移到了中间位置,结果两边都多出来一点点
<!--RoleSelect.php:用户角色下拉框---------------><?php include_once("RoleClass.php"); //利用Role类的InitData()读取用户角色信息 $Role=new Role(); $roleid=$Role->RolePri($_SESSION["ss_user_id"]); //循环将用户角色写入下拉框选项中 echo "<select name=RoleSelect>"; foreach($Role->mInforArray as $item) { echo "<option value=".$item->RoleId.">".$item->RoleName."</option>"; } echo "</select>"?>
<!--RoleClass.php:状态类---------------------------------><?phpclass Role{ var $mInforArray; //状态基本信息数组 var $pRoleId=0; var $mRoleArray;/********************************************* 函数: InitData功能: 获取公文状态的基本信息,放入数组mInforArray中输入参数: ***********************************************/ function GetRoleIdFromUserId($pUserId){ require("sys_conf.inc"); require_once("DataBase.php"); $db=new DataBase($DBHOST,$DBUSER,$DBPWD,$DBNAME); //获取权限信息 $db->SqlString="select * from user"; $db->SqlString=$db->SqlString." where UserId=$pUserId "; $db->Query(); $this->mRoleArray=$db->mResultArray; $this->pRoleId= $this->mRoleArray[0]->RoleId; $db->__destruct();}function RolePri($pUserId){ require("sys_conf.inc"); require_once("DataBase.php"); $db=new DataBase($DBHOST,$DBUSER,$DBPWD,$DBNAME); $this->GetRoleIdFromUserId($pUserId); //获取基本信息 $db->SqlString="select * from role where RoleId < $this->pRoleId"; $db->Query(); $this->mInforArray=$db->mResultArray; $db->__destruct(); }}?>
PHP代码我看不懂的。。。。。。。你把这些代码生成后的html代码贴出来就行了。
密码框和文本框的默认宽度是不一样的 你要设置一个指定的宽度
select一样设置一个宽度比较好
<select name=RoleSelect> <option value= $item->RoleId > $item->RoleName</option>; </select>
大概就是这样子
兄弟别怪我吐槽。。。 看到table用来布局 我就。。。。
密码框和文本框的默认宽度是不一样的 你要设置一个指定的宽度
select一样设置一个宽度比较好
嗯呢,文本框密码框改过来了,但是select好像不行,这个是位置不对,大小无所谓。
兄弟别怪我吐槽。。。 看到table用来布局 我就。。。。
怎么啦 我不太懂,我都是网上找的直接下来用。
<style type="text/css">body{font:12px Arial, Helvetica, sans-serif; color: #000; background-color: #EEF2FB; margin: 0px; }//这里加 看-下行不select{ position: relative; left: 0px; top: 0px; width: 185px; }</style>觉得是样式问题呢
<style type="text/css">body{font:12px Arial, Helvetica, sans-serif; color: #000; background-color: #EEF2FB; margin: 0px; }//这里加 看-下行不select{ position: relative; left: 0px; top: 0px; width: 185px; }</style>觉得是样式问题呢
我已经解决了,把select写在php外面就好了。
我已经解决了,把select写在php外面就好了。
Good job

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック









HTMLは、簡単に学習しやすく、結果をすばやく見ることができるため、初心者に適しています。 1)HTMLの学習曲線はスムーズで簡単に開始できます。 2)基本タグをマスターして、Webページの作成を開始します。 3)柔軟性が高く、CSSおよびJavaScriptと組み合わせて使用できます。 4)豊富な学習リソースと最新のツールは、学習プロセスをサポートしています。

HTMLはWeb構造を定義し、CSSはスタイルとレイアウトを担当し、JavaScriptは動的な相互作用を提供します。 3人はWeb開発で職務を遂行し、共同でカラフルなWebサイトを構築します。

Anexampleapalofastartingtaginhtmlis、それはaperginsaparagraph.startingtagsaresentionentientiontheyinitiateelements、definetheirtypes、およびarecrucialforurturingwebpagesandcontingthomedomを構築します。

webdevelopmentReliesOnhtml、css、andjavascript:1)htmlStructuresContent、2)cssStylesit、および3)Javascriptaddsinteractivity、形成、

Y軸位置Webアノテーション機能の適応アルゴリズムこの記事では、単語文書と同様の注釈関数、特に注釈間の間隔を扱う方法を実装する方法を探ります...

GiteEpages静的Webサイトの展開が失敗しました:404エラーのトラブルシューティングと解像度Giteeを使用する

画像をクリックした後、散乱と周囲の画像を拡大する効果を実現するには、多くのWebデザインがインタラクティブな効果を実現する必要があります。特定の画像をクリックして周囲を作成してください...

HTML、CSS、およびJavaScriptは、Web開発の3つの柱です。 1。HTMLは、Webページ構造を定義し、などなどのタグを使用します。2。CSSは、色、フォントサイズなどのセレクターと属性を使用してWebページスタイルを制御します。
