CSS问题,求赐教!!!!!!!!!!!!!!!!!!!!!!_html/css_WEB-ITnose
CSS HTML
现在有个页面是这样的 代码如下, 有这么几个需求1,
2,
麻烦大神赐教,如何修改当前的页面!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> {$PLUGIN_TITLE} </title><script language="php"> $templateVersion = 2; // Template version // $fieldRowLayout determines the layout of the form fields // Options are 'fieldset' and 'table' // fieldset: displays fieldnames above the input box // table: displays fieldnames in front of the input box $fieldRowLayout = 'table'; // This JS file checks the form for required fields and correct syntax: print '<scr' . 'ipt src="/x/plugin/plugin.js.php?' . htmlspecialchars($_SERVER['QUERY_STRING']) . '" type="text/javascript"></scr' . 'ipt>';</script> <style type="text/css">html { height: 100%; width: 100%; background: #FFFFFF; /* Old browsers */ font-family:'微软雅黑','宋体',Arial, Helvetica, sans-serif; }body { height: 100%; width: 100%; margin: 0; border: 0; background-position: center center; -webkit-background-size: cover; -o-background-size: cover; -moz-background-size: cover; background-size: cover; font-size:12px; font-family:'微软雅黑','宋体',Arial, Helvetica, sans-serif; color:#333333; }body.box{ background-image: url(images/bg1.jpg); background-color:#adc8db;}#main_bg{ position: absolute; top: 40%; left: 50%; width: 20%; height:10%; text-align: left; background-color: rgba(255, 255, 255, 0.8); color: #333333; margin:0 0 0 -176px; -webkit-box-shadow:0px 1px 2px #7d7d7d; -moz-box-shadow:0px 1px 2px #7d7d7d; box-shadow:0px 1px 2px #7d7d7d; padding:50px; background-color:#ECEFF1;}#logo{ position:absolute; top: 32%; left: 50%; width: 172PX; height: 43px; margin:0 0 0 -176px; }#headerDiv,#titleDiv,#contentDiv,#footerDiv{ background-color: rgba(255, 255, 255, 0.8); border:none;}td input{ width:234px;}label.req{display:none; width:0px;}div.explanation{display:none;}.input input{ background-image:url(/mailings/268/tmpl/438/images/input.jpg); width:70%; height:36px; font-size:14px; font-family:'微软雅黑','宋体',Arial, Helvetica, sans-serif; color:#999999; border:none; padding-left:10px;}textarea{ background-color:#25282b; width:222px; height:136px; border:none;}.buttons button{background-image:url(/mailings/268/tmpl/438/images/aniu1.png); width:97px; height:39px; border:none;}p.buttons{ text-align:right;} fieldset.odd, fieldset.even { padding: 0px; margin:0px; text-align:left;}</style> </head> <body class="box"> <div id="logo"> ?<img src="/static/imghw/default1.png" data-src="images/logo.png" class="lazy" alt="" /> </div> <div id="main_bg"> <div class="editable"> plugin content goes here <input type=text> </div> </div> </body></html>
回复讨论(解决方案)
1,
既然要居中自然left right相等,top bottom相等,不需要使用width height。
#main_bg{
position: absolute;
top: 40%;
left: 40%;
right:40%;
bottom:40%;
text-align: left;
background-color: rgba(255, 255, 255, 0.8);
color: #333333;
margin:0 0 0 -176px;
-webkit-box-shadow:0px 1px 2px #7d7d7d;
-moz-box-shadow:0px 1px 2px #7d7d7d;
box-shadow:0px 1px 2px #7d7d7d;
padding:50px;
background-color:#ECEFF1;
}
2.
这个可以使用span contenteditalbe="true"来模拟input框,span可以随着长度增长改变。
#span {
min-width:200px;
border: 1px solid;
display:block;
white-space:nowrap;
}

핫 AI 도구

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

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

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

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

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

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

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

뜨거운 주제











이 기사는 HTML & lt; Progress & Gt에 대해 설명합니다. 요소, 그 목적, 스타일 및 & lt; meter & gt의 차이; 요소. 주요 초점은 & lt; progress & gt; 작업 완료 및 & lt; meter & gt; Stati의 경우

이 기사는 HTML & LT; Datalist & GT에 대해 논의합니다. 자동 완성 제안을 제공하고, 사용자 경험을 향상시키고, 오류를 줄임으로써 양식을 향상시키는 요소. 문자 수 : 159

HTML은 간단하고 배우기 쉽고 결과를 빠르게 볼 수 있기 때문에 초보자에게 적합합니다. 1) HTML의 학습 곡선은 매끄럽고 시작하기 쉽습니다. 2) 기본 태그를 마스터하여 웹 페이지를 만들기 시작하십시오. 3) 유연성이 높고 CSS 및 JavaScript와 함께 사용할 수 있습니다. 4) 풍부한 학습 리소스와 현대 도구는 학습 과정을 지원합니다.

이 기사는 HTML & lt; meter & gt에 대해 설명합니다. 범위 내에 스칼라 또는 분수 값을 표시하는 데 사용되는 요소 및 웹 개발의 일반적인 응용 프로그램. & lt; meter & gt; & lt; Progress & Gt; 그리고 Ex

이 기사는 & lt; iframe & gt; 외부 컨텐츠를 웹 페이지, 공통 용도, 보안 위험 및 객체 태그 및 API와 같은 대안을 포함시키는 태그의 목적.

이 기사는 모바일 장치의 반응 형 웹 디자인에 필수적인 Viewport Meta Tag에 대해 설명합니다. 적절한 사용이 최적의 컨텐츠 스케일링 및 사용자 상호 작용을 보장하는 방법을 설명하는 반면, 오용은 설계 및 접근성 문제로 이어질 수 있습니다.

HTML은 웹 구조를 정의하고 CSS는 스타일과 레이아웃을 담당하며 JavaScript는 동적 상호 작용을 제공합니다. 세 사람은 웹 개발에서 의무를 수행하고 화려한 웹 사이트를 공동으로 구축합니다.

anexampleStartingtaginhtmlis, whithbeginsaparagraph.startingtagsareessentialinhtmlastheyinitiate rements, definetheirtypes, andarecrucialforstructurituringwebpages 및 smanstlingthedom.
