1 回答

TA貢獻1828條經驗 獲得超6個贊
好吧,我找到了解決方案。CutyCapt 沒有“工具/參數”來制作 const img 大?。ɡ鐚挾然蚋叨龋?,但如果您有自己的 html 頁面(您可以編輯/更新的頁面),您可以使用 const 參數將其轉換為圖像。您需要將您的html頁面(body標簽內的內容)內容與container括起來。在樣式標簽或 css 中設置該容器的參數,例如 width=1920px;
查看代碼片段
<!Doctype HTML>
<html>
<head>
<meta charset="UTF-8">
<title>fixed layout</title>
<style>
/* This is a comment it is not read by any browser
This is where the css styling goes */
body{
color:#000;
background-color:#fff;
padding:0;
margin:0;
}
#container{
/*Styling for any element with the id="container" */
width:1912px; /* The width is fixed by pixels */
color:#fff;
background-color:red;
}
</style>
</head>
<body>
<div id="container">
<p id="content"> I have a fixed width so you can only see me and the body if your monitor has enough pixels. Otherwise you will just see me, the container</p>
</div>
</body>
</html>
例如,如果您需要寬度 1920,為什么選擇 1912px 而不是 1920px。好吧,如果你使用 CutyCapt 將寬度為 1920 px 的 html 頁面轉換為 img,你的輸出 img 寬度將是 1928 而不是 1920,這就是為什么你需要 8px 少的寬度參數。我認為如果您更改 #container 中的填充參數,則無需將參數寬度設置為比所需少 8px。
- 1 回答
- 0 關注
- 130 瀏覽
添加回答
舉報