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="/static/imghwm/default1.png" data-src="../images/left-top-right.gif" class="lazy" style="max-width:90%" style="max-width:90%" / alt="搞不懂了,难道又是BOM头?_html/css_WEB-ITnose" ></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="/static/imghwm/default1.png" data-src="../images/nav-right-bg.gif" class="lazy" style="max-width:90%" style="max-width:90%" / alt="搞不懂了,难道又是BOM头?_html/css_WEB-ITnose" ></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="/static/imghwm/default1.png" data-src="../images/buttom_left2.gif" class="lazy" style="max-width:90%" style="max-width:90%" / alt="搞不懂了,难道又是BOM头?_html/css_WEB-ITnose" ></td> <td height="17" valign="top" background="../images/buttom_bgs.gif"><img src="/static/imghwm/default1.png" data-src="../images/buttom_bgs.gif" class="lazy" style="max-width:90%" style="max-width:90%" / alt="搞不懂了,难道又是BOM头?_html/css_WEB-ITnose" ></td> <td background="..//mail_rightbg.gif"><img src="/static/imghwm/default1.png" data-src="../images/buttom_right2.gif" class="lazy" style="max-width:90%" style="max-width:90%" / alt="搞不懂了,难道又是BOM头?_html/css_WEB-ITnose" ></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="number"], input[type="password"], input[type="tel"], input[type="url"], input[type="text"] {
padding: 1px 0px;
}
而如果不是password,自动加载了另一个样式:
input, input[type="password"], input[type="search"], isindex {
-webkit-appearance: textfield;
padding: 1px;
。。。。。。。
}
这样就长短出来了。
是不是在chrome下才这样,测试了下,在IE9和FF下没有这种情况,在chrome下会发生这样的情形了,应该是chrome浏览器为type=password,自动加载了个样式:
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;
}
而如果不是password,自动加载了另一个样式:
input, input[type="password"], input[type="search"], isindex {
-webkit-appearance: textfield;
padding: 1px;
。。。。。。。
}
这样就长短出来了。
我用的IE6和chrome测试的。。。
是不是在chrome下才这样,测试了下,在IE9和FF下没有这种情况,在chrome下会发生这样的情形了,应该是chrome浏览器为type=password,自动加载了个样式:
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;
}
而如果不是password,自动加载了另一个样式:
input, input[type="password"], input[type="search"], isindex {
-webkit-appearance: textfield;
padding: 1px;
。。。。。。。
}
这样就长短出来了。
我用的IE6和chrome测试的。。。
为“” 加个样式:padding: 1px;就好了,至少chrome下能好,IE6没办法,我这边模拟不了。
为“” 加个样式:padding: 1px;就好了,至少chrome下能好,IE6没办法,我这边模拟不了。
不行,加了两边都会不齐,而且主要问题是那个下拉框,那个空了太多。
这样加:
1.那个input加个class “”
2.在css文件中加:
.in-password {
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

부울 속성은 값없이 활성화되는 HTML의 특수 속성입니다. 1. 부울 속성은 입력 상자를 비활성화하는 등의 존재 여부에 따라 요소의 동작을 제어합니다. 2. 작업 원칙은 브라우저가 구문 분석 할 때 속성의 존재에 따라 요소 동작을 변경하는 것입니다. 3. 기본 사용법은 속성을 직접 추가하는 것이며, 고급 사용량은 JavaScript를 통해 동적으로 제어 될 수 있습니다. 4. 일반적인 실수는 값을 설정해야한다고 잘못 생각하고 올바른 글쓰기 방법은 간결해야합니다. 5. 모범 사례는 코드를 간결하게 유지하고 부울 속성을 합리적으로 사용하여 웹 페이지 성능 및 사용자 경험을 최적화하는 것입니다.

HTML 코드는 온라인 유효성 검사기, 통합 도구 및 자동화 된 프로세스를 통해 깨끗할 수 있습니다. 1) w3cmarkupvalidationservice를 사용하여 온라인으로 HTML 코드를 확인하십시오. 2) 실시간 확인을 위해 VisualStudioCode에 HTMLHINT 확장을 설치하고 구성하십시오. 3) htmltidy를 사용하여 시공 프로세스에서 HTML 파일을 자동으로 확인하고 청소하십시오.

HTML, CSS 및 JavaScript는 최신 웹 페이지를 구축하기위한 핵심 기술입니다. 1. HTML 웹 페이지 구조를 정의합니다. 2. CSS는 웹 페이지의 모양을 담당합니다.

HTML의 기능은 웹 페이지의 구조와 내용을 정의하는 것이며, 그 목적은 정보를 표시하는 표준화 된 방법을 제공하는 것입니다. 1) HTML은 타이틀 및 단락과 같은 태그 및 속성을 통해 웹 페이지의 다양한 부분을 구성합니다. 2) 콘텐츠 및 성능 분리를 지원하고 유지 보수 효율성을 향상시킵니다. 3) HTML은 확장 가능하므로 사용자 정의 태그가 SEO를 향상시킬 수 있습니다.

HTML의 미래 트렌드는 의미론 및 웹 구성 요소이며 CSS의 미래 트렌드는 CSS-In-JS 및 CSShoudini이며, JavaScript의 미래 트렌드는 WebAssembly 및 서버리스입니다. 1. HTML 시맨틱은 접근성과 SEO 효과를 향상시키고 웹 구성 요소는 개발 효율성을 향상 시키지만 브라우저 호환성에주의를 기울여야합니다. 2. CSS-in-JS는 스타일 관리 유연성을 향상 시키지만 파일 크기를 증가시킬 수 있습니다. CSShoudini는 CSS 렌더링의 직접 작동을 허용합니다. 3. Webosembly는 브라우저 애플리케이션 성능을 최적화하지만 가파른 학습 곡선을 가지고 있으며 서버리스는 개발을 단순화하지만 콜드 스타트 문제의 최적화가 필요합니다.

웹 개발에서 HTML, CSS 및 JavaScript의 역할은 다음과 같습니다. 1. HTML은 웹 페이지 구조를 정의하고, 2. CSS는 웹 페이지 스타일을 제어하고 3. JavaScript는 동적 동작을 추가합니다. 그들은 함께 현대 웹 사이트의 프레임 워크, 미학 및 상호 작용을 구축합니다.

HTML의 미래는 무한한 가능성으로 가득합니다. 1) 새로운 기능과 표준에는 더 많은 의미 론적 태그와 WebComponents의 인기가 포함됩니다. 2) 웹 디자인 트렌드는 반응적이고 접근 가능한 디자인을 향해 계속 발전 할 것입니다. 3) 성능 최적화는 반응 형 이미지 로딩 및 게으른로드 기술을 통해 사용자 경험을 향상시킬 것입니다.

웹 개발에서 HTML, CSS 및 JavaScript의 역할은 다음과 같습니다. HTML은 컨텐츠 구조를 담당하고 CSS는 스타일을 담당하며 JavaScript는 동적 동작을 담당합니다. 1. HTML은 태그를 통해 웹 페이지 구조와 컨텐츠를 정의하여 의미를 보장합니다. 2. CSS는 선택기와 속성을 통해 웹 페이지 스타일을 제어하여 아름답고 읽기 쉽게 만듭니다. 3. JavaScript는 스크립트를 통해 웹 페이지 동작을 제어하여 동적 및 대화식 기능을 달성합니다.


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

Eclipse용 SAP NetWeaver 서버 어댑터
Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

DVWA
DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

VSCode Windows 64비트 다운로드
Microsoft에서 출시한 강력한 무료 IDE 편집기
