การสร้าง Search Form และ Inline Form ด้วย Twitter Bootstrap

ตอบกระทู้

รูปแสดงอารมณ์
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
รูปแสดงอารมณ์อื่นๆ

BBCode เปิด
[img] เปิด
[url] เปิด
[Smile icon] เปิด

กระทู้แนะนำ
   

มุมมองที่ขยายได้ กระทู้แนะนำ: การสร้าง Search Form และ Inline Form ด้วย Twitter Bootstrap

Re: การสร้าง Search Form และ Inline Form ด้วย Twitter Bootstrap

โดย boo_kyoshii » 21/08/2013 10:55 am

ลองทำตามค่ะ
e-mail.jpg
e-mail.jpg (18.42 KiB) Viewed 6105 times
testbootstrap.zip
ไฟล์ตัวอย่างที่ทำค่ะ
(87.81 KiB) ดาวน์โหลดแล้ว 318 ครั้ง

การสร้าง Search Form และ Inline Form ด้วย Twitter Bootstrap

โดย M008 » 22/05/2013 2:53 pm

การสร้าง Search Form
ใส่ code นี้ลงไปใน ส่วนของ <body>

โค้ด: เลือกทั้งหมด

<form class="form-search">
			<input type="text" class="input-medium search-query">
			<button type="submit" class="btn">Search</button>
</form>
ผลลัพธ์จะออกมาดังรูป
1.jpg
1.jpg (7.5 KiB) Viewed 6344 times
การสร้าง In-line Form

โค้ด: เลือกทั้งหมด

<form class="form-inline">
         <input type="text" class="input-small" placeholder="Email">
         <input type="password" class="input-small" placeholder="Password">
         <label class="checkbox">
               <input type="checkbox"> Remember me
         </label>
         <button type="submit" class="btn">Sign in</button>
</form>
ผลลัพธ์ที่ได้ดังรูป
2.jpg
2.jpg (12.48 KiB) Viewed 6344 times
ขนาดของกล่องเราสามารถกำหนดได้ รูปด้านบนกำหนดเป็น input-small

โค้ด: เลือกทั้งหมด

<input class="input-mini" type="text" placeholder=".input-mini">
<input class="input-small" type="text" placeholder=".input-small">
<input class="input-medium" type="text" placeholder=".input-medium">
<input class="input-large" type="text" placeholder=".input-large">
<input class="input-xlarge" type="text" placeholder=".input-xlarge">
<input class="input-xxlarge" type="text" placeholder=".input-xxlarge">
ผลลัพธ์ที่ได้ดังรูป
เลือกขนาดได้ตามรูป โดยใช้ code ด้านบนคะ
3.jpg
3.jpg (24.93 KiB) Viewed 6344 times

ข้างบน