Tauri 創(chuàng)建一個極簡的前端

2023-10-17 14:39 更新

我們將創(chuàng)建一個極簡的HTML文件,作為我們示例應(yīng)用程序的前端。我們稍后還將在我們的WebDriver測試中使用該前端的一些內(nèi)容。

首先,讓我們創(chuàng)建一個Tauri的distDir,我們知道一旦構(gòu)建應(yīng)用程序的Tauri部分,我們將需要它。運行mkdir dist會在其中創(chuàng)建一個名為dist/的新目錄,我們將在其中放置以下index.html文件。

?dist/index.html?:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Hello Tauri!</title>
<style>
body {
/* Add a nice colorscheme */
background-color: #222831;
color: #ececec;

/* Make the body the exact size of the window */
margin: 0;
height: 100vh;
width: 100vw;

/* Vertically and horizontally center children of the body tag */
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<h1>Hello, Tauri!</h1>
</body>
</html>


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號