gpt4 book ai didi

delphi - 如何去除TWebBrowser的边框和滚动条?

转载 作者:行者123 更新时间:2023-12-03 15:54:27 25 4
gpt4 key购买 nike

如何删除 TWebBrowser 组件的边框和滚动条?我搜索了很多,所有答案都差不多:

http://www.swissdelphicenter.com/torry/printcode.php?id=1171

http://delphidabbler.com/articles?article=18

但不起作用(它什么也不做!)。就我而言,我想在浏览器中查看本地文件。

如何隐藏边框和滚动条?

最佳答案

你可以使用css,TWebbrowser使用internet explorer(网站管理员的恐怖引擎->溢出:隐藏)。这种样式解决方法对我来说效果很好(不是在 body 节点中,而是在 html 中),在本地文件中尝试添加此样式:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<style>
html
{
position:fixed;
overflow:hidden;
-ms-overflow-style: none;
border:0px;
}</style>
</head>
<body>
Test
</body>
</html>

就我而言,它可以工作(delphi xe 4 和 windows 7),我制作了一个没有滚动条的小尺寸 webview。

关于delphi - 如何去除TWebBrowser的边框和滚动条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26717415/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com