2016-11-27 65 views
0

我想改變這個應用程序的字體大小,什麼是最好的方法?我曾嘗試在CSS添加字體大小。任何提示,我要去哪裏錯了?感謝如何更改此html/php表單的寬度和樣式?

https://jsfiddle.net/2wwo347n/

h2 { 
    font-family: "Verdana", Verdana, serif; 
    font-size: 14px; 

} 

進出口新的編碼,其他任何提示或暗示讚賞

<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de-de" lang="de-de" > 

<head> 
<title>Kontakt - A.Willi A.G</title> 
<script> 
function _(id){ return document.getElementById(id); } 
function submitForm(){ 
    _("mybtn").disabled = true; 
    _("status").innerHTML = 'please wait ...'; 
    var formdata = new FormData(); 
    formdata.append("n", _("n").value); 
    formdata.append("e", _("e").value); 
    formdata.append("m", _("m").value); 
    var ajax = new XMLHttpRequest(); 
    ajax.open("POST", "example_parser.php"); 
    ajax.onreadystatechange = function() { 
     if(ajax.readyState == 4 && ajax.status == 200) { 
      if(ajax.responseText == "success"){ 
       _("my_form").innerHTML = '<h2>Thanks '+_("n").value+', your message has been sent.</h2>'; 
      } else { 
       _("status").innerHTML = ajax.responseText; 
       _("mybtn").disabled = false; 
      } 
     } 
    } 
    ajax.send(formdata); 
} 
</script> 

    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <meta http-equiv= "content-type" content="text/html"; charset="UTF-8"> 
    <meta name ="web_author" content="A.Willi A.G A.J.W"> 
    <meta name="robots" content="noarchive"> 
    <meta name="robots" content="selection"> 
    <meta name="language" content="DE"> 
    <meta name='pagename' content='Home, Rohrschlosser, Schweisser, Jobs, Personalverleih, Basel, Schweiz.'> 
    <meta name="copyright" content="Copyright at A.Willi A.G Personalverleih, Rohrschlosser, Schweisser, Basel."> 
    <meta name ="description" content= 

     "Die A.Willi A.G ist als Personalverleiher in der gesamten Schweiz und im Ausland erfolgreich 
     tatig mit über 30-jahrige Erfahrung in dieser Sparte.<<Wir suchen immer neue 
     Montagepersonel; Rohrschlosser, Schweisser und Monteur>><<Basel, Jobs, Welder, 
     Pipefitter, Mntage, Arbeitsmarkt, Temporär>>"> 

</head> 

<body> 


<link rel="shortcut icon" href="aw.png"> 
<link rel="stylesheet" href="index.css" type="text/css"/> 
<div class="container"> 

<div class="logo"> 
<h1 align="center"><img src="logo2.png" height="110" width="500" alt="A.Willi A.G" /</h1> 
</div> 

<div class="menu"> 
<ul> 
    <li><a href="index.html">Home</a></li> 
    <li class="dropdown"> 
    <a href="" class="dropbtn">Bewerber</a> 
    <div class="dropdown-content"> 
    <a href="info.html">Info</a> 
    <a href="jobs.html">Jobs</a> 
</div> 
</li> 

<li class="dropdown"> 
    <a href="#" class="dropbtn">Kunde</a> 
    <div class="dropdown-content"> 
    <a href="personnel.html">Personalverleih</a> 
    <a href="rental.html">Werkzeuge Mieten</a> 
    <a href="refrences.html">Referenzen</a> 
    <a href="quali.html">Qulität, Sicherheit und Weiterbildung</a> 
</ul> 
</li> 
</div> 

<div class="slideshow"> 
    <img src="panorama.jpg"> 
    <img src="panorama.jpg"> 
    <img src="panorama.jpg"> 
</div> 

<h2 align="center"> <!--FORM--> 
<form id="my_form" onsubmit="submitForm(); return false;"> 
    <p><input id="n" placeholder="Vorname" required></p> 
    <p><input id="x" placeholder="Nachname" required></p> 
    <p><input id="z" placeholder="Telefon" required></p> 
    <p><input id="e" placeholder="Email Address" type="email" required></p> 
    <textarea id="m" placeholder="write your message here" rows="10" required></textarea> 
    <p><input id="mybtn" type="submit" value="Submit Form"> <span id="status"></span></p> 
</form> 
    </h2> 

回答

1

的DOM,你似乎改變字體大小是<h2>。如果我正確理解你的問題,你似乎想改變<input>標籤的字體大小。你可以做內聯樣式,以增加字體大小,像這樣:

<p><input style="font-size: 40px" id="n" placeholder="Vorname" required></p> 
<p><input style="font-size: 40px" id="x" placeholder="Nachname" required></p> 
<p><input style="font-size: 40px" id="z" placeholder="Telefon" required></p> 

更好的做法,然而,告訴我們,我們應該做同樣的事情與我們在<h2>標籤做了什麼,除了在<input>你這樣的css文件:

input { 
    font-size:40px; 
} 
+0

乾杯傑克,欣賞幫助隊友 –

相關問題