Bootstrap .radio-inline 類
使用 .radio-inline 類將一系列單選按鈕控制元件顯示在同一行中。你可以嘗試執行以下程式碼,在 Bootstrap 中實現 radio-inline 類 −
示例
<!DOCTYPE html> <html> <head> <title>Bootstrap Forms</title> <meta name = "viewport" content = "width=device-width, initial-scale = 1"> <link rel = "stylesheet" href = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> </head> <body> <label for = "name">Best Porgraming Language</label> <div> <label class = "radio-inline"> <input type = "radio" name = "optionsRadiosinline" id = "optionsRadios3" value = "option1" checked> Java </label> <label class = "radio-inline"> <input type = "radio" name = "optionsRadiosinline" id = "optionsRadios4" value = "option2"> C </label> <label class = "radio-inline"> <input type = "radio" name = "optionsRadiosinline" id = "optionsRadios4" value = "option3"> C++ </label> </div> </body> </html>
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
安卓
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP