漂亮的用户反馈界面(CSS/HTML)

9 篇文章 1 订阅

先上效果图:





用户反馈页面作为一个网址不可缺少的部分,用户的意见对网站的优化和维护起到非常重要的作用,一个漂亮简约的用户反馈界面才能让用户有耐心去填写遇到的问题。


代码部分:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>report</title>
    <style type="text/css">
        .Content-Main{
            max-width: 500px;
            margin: auto;
            margin-top: 50px;
            padding: 20px 30px 20px 30px;
            font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
            text-shadow: 1px 1px 1px #FFF;
            border: 1px solid #DDD;
            border-radius: 5px;
            color: #888;
            background: #FFF;
        }
        .Content-Main h1{
            display: block;
            padding: 0px 0px 10px 40px;
            margin: -10px -30px 30px -30px;
            font: 25px "Helvetica Neue", Helvetica, Arial, sans-serif;
            border-bottom: 1px solid #DADADA;
            color: #888;
        }
        .Content-Main h1>span{
            display: block;
            font-size: 11px;
        }
        .Content-Main label{
            display: block;
            margin: 0px 0px 5px;
        }
        .Content-Main label>span{
            float: left;
            width: 20%;
            padding-right: 10px;
            margin-top: 10px;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-weight: bold;
            text-align: right;
            color: #333;
        }
        .Content-Main input[type="text"],.Content-Main textarea{
            width: 70%;
            height: 20px;
            padding: 5px 0px 5px 5px;
            margin-bottom: 16px;
            margin-right: 6px;
            margin-top: 2px;
            line-height: 15px;
            border-radius: 4px;
            border: 1px solid #CCC;
            color: #888;
            -webkit-border-radius: 4px;
            -moz-border-radius: 4px;
            -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
            box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
            -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        }
        .select1{
            width: 71%;
            height: 35px;
            margin-bottom: 16px;
            margin-right: 6px;
            margin-top: 2px;
            line-height: 15px;
            padding: 5px 0px 5px 5px;
            border-radius: 4px;
            border: 1px solid #CCC;
            color: #888;
            -webkit-border-radius: 4px;
            -moz-border-radius: 4px;
            -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
            box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
            -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        }
        .select2{
            width: 13%;
            border-radius: 4px;
            border: 1px solid #CCC;
            color: #888;
            -webkit-border-radius: 4px;
            -moz-border-radius: 4px;
            -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
            box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
            -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        }
        .Content-Main textarea{
            width: 70%;
            height: 100px;
            padding: 5px 0px 0px 5px;
        }
        .button{
            padding: 10px 25px 10px 25px;
            margin-left: 111px;
            border-radius: 4px;
            border:1px solid #CCC;
            background: #FFF;
            color: #333;
        }
        .button:hover{
            color: #333;
            background-color: #EBEBEB;
            border-color: #ADADAD;
        }
    </style>
</head>
<body>
<div class="Content-Main">
    <div class="Content-Main1">
        <h1>用户反馈</h1>
    </div>
    <form action="" method="post" class="form-report">
        <label>
            <span>Contact:</span>
            <select name="select2" class="select2">
                <option value="Email">Email</option>
                <option value="Phone">Phone</option>
                <option value="QQ">QQ</option>
            </select>
            <input type="text" placeholder="">
        </label>
        <label>
            <span>Message:</span>
            <textarea id="mesaage" name="message" placeholder="Your can tell me"></textarea>
        </label>
        <label>
            <span>Subject:</span>
            <select name="select1" class="select1">
                <option value="Job Inquiry">Job Inquiry</option>
                <option value="General Question">General Question</option>
            </select>
        </label>
        <label>
            <input type="button" class="button" value="Send">
        </label>
    </form>
</div>
</body>
</html>

Java前端用户反馈界面可以使用Swing或JavaFX进行编写。以下是使用JavaFX编写的一个示例: 首先,创建一个JavaFX项目,并在主界面上添加一个按钮,当用户单击该按钮时,将打开反馈对话框。 ```java public class MainController implements Initializable { @FXML private Button feedbackButton; @Override public void initialize(URL url, ResourceBundle rb) { // 初始化代码 } @FXML private void handleFeedbackButtonAction(ActionEvent event) { // 打开反馈对话框 } } ``` 接下来,创建一个反馈对话框,该对话框包含一个文本框和一个提交按钮。当用户单击提交按钮时,应该将反馈信息提交到服务器。 ```java public class FeedbackController implements Initializable { @FXML private TextArea feedbackTextArea; @Override public void initialize(URL url, ResourceBundle rb) { // 初始化代码 } @FXML private void handleSendButtonAction(ActionEvent event) { String feedback = feedbackTextArea.getText(); // 将反馈信息提交到服务器 // ... // 关闭对话框 Stage stage = (Stage) feedbackTextArea.getScene().getWindow(); stage.close(); } } ``` 最后,在主界面中的按钮单击事件处理方法中,创建一个反馈对话框并显示它。 ```java @FXML private void handleFeedbackButtonAction(ActionEvent event) { try { FXMLLoader loader = new FXMLLoader(getClass().getResource("Feedback.fxml")); Parent root = loader.load(); Scene scene = new Scene(root); Stage stage = new Stage(); stage.setScene(scene); stage.show(); } catch (IOException e) { e.printStackTrace(); } } ``` 这样就完成了一个简单的Java前端用户反馈界面的编写。
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值