:ﺪﻧﺭﺍﺩ ﯽﺒﺳﺎﻨﻣ ﻡﺮﻓ ﻞﯾﺎﺘﺳﺍ .form-control
ﺱﻼﮐ ﺎﺑ
<form action="/action_page.php">
<div class="mb-3 mt-3">
<label for="email" class="form-label">Email:</label>
<input type="email" class="form-control" id="email" placeholder="Enter email" name="email">
</div>
<div class="mb-3">
<label for="pwd" class="form-label">Password:</label>
<input type="password" class="form-control" id="pwd" placeholder="Enter password" name="pswd">
</div>
<div class="form-check mb-3">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" name="remember"> Remember me
</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container mt-3">
<h2>Stacked form</h2>
<form action="/action_page.php">
<div class="mb-3 mt-3">
<label for="email">Email:</label>
<input type="email" class="form-control" id="email" placeholder="Enter email" name="email">
</div>
<div class="mb-3">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd" placeholder="Enter password" name="pswd">
</div>
<div class="form-check mb-3">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" name="remember"> Remember me
</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</body>
</html>
.ﻢﯿﻨﮐ ﻞﺻﺎﺣ ﻥﺎﻨﯿﻤﻃﺍ padding ﺖﺤﺻ ﺯﺍ ﺎﺗ ﻢﯿﻨﮐ ﯽﻣ ﻪﻓﺎﺿﺍ ﺐﺴﭼﺮﺑ ﺮﺼﻨﻋ ﺮﻫ ﻪﺑ ﺍﺭ .ﺪﻨﻨﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ .form-check-input
ﺯﺍ ﯽﯾﻮﯾﺩﺍﺭ
<label for="comment">Comments:</label>
<textarea class="form-control" rows="5" id="comment" name="text"></textarea>
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container mt-3">
<h2>Textarea</h2>
<p>Use the .form-control class to style textareas as well:</p>
<form action="/action_page.php">
<div class="mb-3 mt-3">
<label for="comment">Comments:</label>
<textarea class="form-control" rows="5" id="comment" name="text"></textarea>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</body>
</html>
:ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ .col
ﻭ ﻒﯾﺩﺭ <"code class
<form>
<div class="row">
<div class="col">
<input type="text" class="form-control" placeholder="Enter email" name="email">
</div>
<div class="col">
<input type="password" class="form-control" placeholder="Enter password" name="pswd">
</div>
</div>
</form>
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container mt-3">
<h2>Inline Forms</h2>
<p>If you want your form elements to appear side by side, use .row and .col:</p>
<form>
<div class="row">
<div class="col">
<input type="text" class="form-control" placeholder="Enter email" name="email">
</div>
<div class="col">
<input type="password" class="form-control" placeholder="Enter password" name="pswd">
</div>
</div>
</form>
</div>
</body>
</html>
.ﺖﺧﻮﻣﺁ ﺪﯿﻫﺍﻮﺧ ﺎﻫ ﻒﯾﺩﺭ ﻭ ﺎﻫ ﻥﻮﺘﺳ ﺩﺭﻮﻣ ﺭﺩ ﯼﺮﺘﺸﯿﺑ ﺕﺎﻋﻼﻃﺍ Bootstrap Grids ﻞﺼﻓ ﺭﺩ
: → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ :ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﯽﻧﺪﻧﺍﻮﺧ ﻂﻘﻓ ﺎﯾ/ﻭ ﻝﺎﻌﻓﺮﯿﻏ ﯼﺎﻫ ﯽﮔﮋﯾﻭ ﺯﺍ ﯼﺩﻭﺭﻭ ﺪﻠﯿﻓ ﻥﺩﺮﮐ ﻝﺎﻌﻓﺮﯿﻏ ﯼﺍ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ :ﺪﯿﻨﮐ ﻆﻔﺣ ﺍﺭ ﺐﺳﺎﻨﻣ padding ﻭ ﺎﻫ ﻪﯿﺷﺎﺣ ﺎﻣﺍ ،ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ ﻪﯿﺷﺎﺣ ﻥﻭﺪﺑ ﯼﺩﻭﺭﻭ ﺪﻠﯿﻓ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ :ﺪﯿﻨﮐ ﻩﺩﺎﻔﺘﺳﺍ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ ﻝﺎﺜﻣ
<input type="text" class="form-control form-control-lg" placeholder="Large input">
<input type="text" class="form-control" placeholder="Normal input">
<input type="text" class="form-control form-control-sm" placeholder="Small input">
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container mt-3">
<h2>Form Control Size</h2>
<p>You can change the size of .form-control inputs with .form-control-lg or .form-control-sm:</p>
<form>
<input type="text" class="form-control form-control-lg" placeholder="Large input">
<input type="text" class="form-control mt-3" placeholder="Normal input">
<input type="text" class="form-control form-control-sm mt-3" placeholder="Small input">
</form>
</div>
</body>
</html>
ﯽﻧﺪﻧﺍﻮﺧ ﻂﻘﻓ ﻭ ﻝﺎﻌﻓﺮﯿﻏ
ﻝﺎﺜﻣ
<input type="text" class="form-control" placeholder="Normal input">
<input type="text" class="form-control" placeholder="Disabled input" disabled>
<input type="text" class="form-control" placeholder="Readonly input" readonly>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container mt-3">
<h2>Disabled and Readonly</h2>
<p>Use the disabled and/or readonly attributes to disable the input field:</p>
<form>
<input type="text" class="form-control" placeholder="Normal input">
<input type="text" class="form-control mt-3" placeholder="Disabled input" disabled>
<input type="text" class="form-control mt-3" placeholder="Readonly input" readonly>
</form>
</div>
</body>
</html>
ﻩﺩﺎﺳ ﻦﺘﻣ ﯼﺎﻫ ﯼﺩﻭﺭﻭ
ﻝﺎﺜﻣ
<input type="text" class="form-control-plaintext" placeholder="Plaintext input">
<input type="text" class="form-control" placeholder="Normal input">
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container mt-3">
<h2>Plaintext</h2>
<p>Use the .form-control-plaintext class to style an input field without borders, but with correct marigins and padding:</p>
<form>
<input type="text" class="form-control-plaintext" placeholder="Plaintext input">
<input type="text" class="form-control mt-3" placeholder="Normal input">
</form>
</div>
</body>
</html>
ﮓﻧﺭ ﻩﺪﻨﻨﮐ ﺏﺎﺨﺘﻧﺍ
.form-control-color
ﺱﻼﮐ ﺯﺍ ،"ty ﻝﺎﺜﻣ
<input type="color" class="form-control form-control-color" value="#CCCCCC">
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container mt-3">
<h2>Color Picker</h2>
<p>To style an input with type="color" properly, use the .form-control-color class:</p>
<form>
<label for="myColor" class="form-label">Color picker</label>
<input type="color" class="form-control form-control-color" id="myColor" value="#CCCCCC" title="Choose a color">
</form>
</div>
</body>
</html>