拖动可拖动元素时,如何不显示“鬼影”?
例如,拖动此元素。它会显示一个鬼影:
<div
draggable="true"
style="background: red; height: 100px; width: 100px;">
Hello
</div>
Run Code Online (Sandbox Code Playgroud) 我正在尝试水平和垂直对齐引导表单,使其位于屏幕中间;但是,我找不到任何解决方案来帮助我。
\n我尝试使用这些引导类,但它们不起作用:\nd-flex align-items-center justify-content-center
这是我的表格:
\n<!DOCTYPE html>\n<html lang="en">\n\n<head>\n <meta charset="UTF-8">\n <meta http-equiv="X-UA-Compatible" content="IE=edge">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">\n <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>\n <title>Login</title>\n</head>\n\n<body>\n <div class="d-flex align-items-center justify-content-center">\n <form>\n <div class="mb-3 form-control-sm">\n <label for="loginInputEmail" class="form-label">Email address</label>\n <input type="email" class="form-control" id="loginInputEmail" aria-describedby="emailHelp">\n <div id="emailHelp" class="form-text">We\'ll never share your email with anyone else.</div>\n </div>\n <div class="mb-3 form-control-sm">\n <label for="loginInputPassword" class="form-label">Password</label>\n <input type="password" class="form-control" id="loginInputPassword">\n </div>\n <div class="mb-3 form-control-sm">\n <label for="selectAccountType" class="form-label">Account type</label>\n <select …Run Code Online (Sandbox Code Playgroud)我已经阅读了所有相关问题,尝试了每个接受的答案,但我仍然没有找到运气.
我有一个在tomcat上运行的网站,有一个子页面/ Demo /,它有四个文本字段和一个Submit按钮.提交按钮如下所示
<form method="post" action="DemoServlet">
<input type="hidden" name="form_action" value="write" />
<table>
<tr>
<td>
First Name:
</td>
<td>
<input type="text"
name="firstname" />
</td>
</tr>
<tr>
<td>
Last Name:
</td>
<td>
<input type="text"
name="lastname" id = "lastname" />
</td>
</tr>
<tr>
<td>
Email:
</td>
<td>
<input type="text"
name="recipient" />
</td>
</tr>
<tr>
<td>
Phone1:
</td>
<td>
<input type="text"
name="phone" />
</td>
</tr>
<tr>
<td>
<input type=button onClick="location.href='../demo-servlet'" value='Submit'/>
</td>
<td>
</td>
</table>
</form>
Run Code Online (Sandbox Code Playgroud)
这个/ demo-servlet在web.xml中指定如下
<servlet>
<servlet-name>DemoServlet</servlet-name>
<servlet-class>PACKAGENAME.DemoServlet</servlet-class>
</servlet>
<servlet-mapping> …Run Code Online (Sandbox Code Playgroud) 我有两个应用程序,其中一个是 NodeJS 监听 5000 的端口,另一个是 ReactJS 监听 3000 的端口。
我可以像这样从 NodeJS 返回 JSON(http://localhost:5000/api/28/10/2018):
{
"date": "28.10.2018",
"across": [
{"no": "1", "text": "Warning about an incoming projectile"},
{"no": "5", "text": "Rapper/producer behind Beats headphones"},
{"no": "6", "text": "Noble gas below xenon on the periodic table"},
{"no": "7", "text": "Setting for much of \"Finding Nemo\""},
{"no": "8", "text": "Looney Tunes character who says \"Th-th-th-that's all, folks!\""}
],
"down": [
{"no": "1", "text": "Harry's enemy at Hogwarts"},
{"no": "2", "text": "Milk …Run Code Online (Sandbox Code Playgroud) 使用toPromise抛出错误
老方法:
import 'rxjs/add/operator/toPromise';
Run Code Online (Sandbox Code Playgroud)
最新方式:
import { toPromise } from 'rxjs/operators';
Run Code Online (Sandbox Code Playgroud)
最新方式显示以下错误:
[ts]模块'"d:/.../ node_modules/rxjs/operators/index"'没有导出成员'toPromise'.
版本:
"typescript": "2.4.2"
"rxjs": "5.5.2",
Run Code Online (Sandbox Code Playgroud)