- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我在使用 webUI 时遇到样式问题。
当我注入(inject)数据值时,我的设计被破坏了。
在我的具体案例中,我的菜单显示不正确。据我所见,{{dataValue}}
的初始字符串长度为 0,并且在 webUI 完成注入(inject)之前应用了 html 和 css。
所以现在当我输入字符串时,看起来它的计算长度有误。
调试时,当我重新编辑 css 文件时(我没有更改宽度:100%,我只是重新编辑并保存以便重新应用 css),然后它看起来很好。
我尝试使用(来自 dart 文件):
element.style.width = "100%";
element.classes.add("classWithWidth100Percent");
但这一切似乎都不起作用。
所以基本上我认为我可以通过重新加载/重新应用 css 来解决这个问题。有人知道如何实现这一目标吗?
编辑:它是什么 {{datavalue}} ? ..把我的字符串.... <- 什么字符串? ..错误的长度.. <- 有什么问题吗?如果您在 Dart 编辑器中“以 Javascript 方式运行”并且只是从硬盘运行 HTML 文件 - 它有效吗? CSS 样式是否正确显示?在哪个浏览器中?
"Word"
编辑 2:
是的,dataValue
有初始值,仍然打破了设计。
String dataValue = "some text";
这是代码:
<div id='headerContainer'>
<div id='headerBg' class="displaying_theFlow"></div>
<header id="header">
<nav id='menu'>
<a href="#theFlow">{{theFlow}}</a>
<a href="#connect">{{connect}}</a>
<a id="logoLink" href="#welcomeScreen">
<div id="logoBg"></div>
<div id="logo" alt="LogoImg">LogoImg</div>
</a>
<a href="#business">{{business}}</a>
<a href="#aboutUs">{{aboutUs}}</a>
</nav>
</header>
</div>
在 .dart 文件中,我只是为字符串 theFlow
、connect
、business
等赋值,然后调用 watcher .dispatch();
这是在 CSS 文件中:
#headerContainer {
/*height: 180px;*/
z-index: 1000;
}
#header{
position: fixed;
top: 15px;
width: 100%;
text-align: center;
text-transform: uppercase;
font-weight: 600;
z-index: 1000;
-webkit-transition: top .2s;
-moz-transition: top .2s;
-ms-transition: top .2s;
-o-transition: top .2s;
transition: top .2s;
}
#header.up {
top: -30px;
}
#headerBg {
position: fixed;
background-color: #274a80;
height:8px;
width: 100%;
z-index: 1000;
-webkit-transition: height .2s;
-moz-transition: height .2s;
-ms-transition: height .2s;
-o-transition: height .2s;
-webkit-transition: background-color .6s;
-moz-transition: background-color .6s;
-ms-transition: background-color .6s;
-o-transition: background-color .6s;
}
#headerBg.long{
height: 75px;
}
#header a {
font-size: 15px;
color: #ffffff;
margin-left : .4em;
margin-right: .4em;
text-decoration: none;
display:inline-block;
vertical-align:middle;
opacity : .3;
-webkit-transition: opacity 1s;
-moz-transition: opacity 1s;
-ms-transition: opacity 1s;
-o-transition: opacity 1s;
}
#header a:hover {
opacity: .5;
}
#header a.active {
opacity: 1;
}
最佳答案
我复制了你的问题,并得到了修复(虽然我担心这是一个 hack)。
我使用 WebUI stub 代码创建了一个新应用程序,然后将 xclickcomponent.dart 的内容替换为以下内容(我还使用您提供的 HTML 作为组件和 CSS 的内容):
@observable
String theFlow = "";
String connect = "connect";
String aboutUs = "";
String business = "business";
CounterComponent() {
// Delay adding the value so CSS has a chance to be drawn.
new Timer(new Duration(seconds: 3), () {this.setFlow();});
}
void setFlow() {
theFlow = "New Flow";
// Now refresh the CSS by removing then adding the stylesheet
var style = query("head>link[rel=stylesheet]");
style.remove();
var elem = new LinkElement();
elem.attributes["rel"] = "stylesheet";
elem.attributes["href"] = "../stackoverflow.css";
var header = query("head");
header.append(elem);
}
即使这对你来说太难了,但希望它能帮助你:)
关于html - Dart webUI CSS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16148831/
TLDR:寻找一个路由解决方案,以在appname之后具有多个Docker Container Port 80 例如 ip地址:80 / wiki ip地址:80 / ticketsystem ip-
我对 Web 组件自动生成的代码有疑问。这是一段 HTML: ... ... 如您所见,有一个名为 to-button 的自定义 Web 组件: ...
我在将 web_ui 添加到我现有的 dart 应用程序时遇到问题。我什至没有将任何特定于 webui 的代码添加到我的 html 文件中,我只是在尝试构建。 我将 web_ui 添加到 pubspe
我在具有 3 个节点的独立集群上使用 spark 1.1.0。 我想查看已完成应用程序的详细日志,所以我在我的程序中进行了设置: set("spark.eventLog.enabled","true"
我们在我们的项目中使用开源的Apache Spark集群。需要以下帮助。 如何启用Spark Web UI登录的登录凭据? 如何从Spark WebUI禁用“杀死按钮”选项? 有人可以帮助我解决问题1
我在弹出窗口中有一个字段,用于输入带有屏蔽文本的电话号码:“( _ _ _ ) _ _ _ - _ _ _ _”。 (屏蔽文本意味着我们正在使用jquery自动格式化输入的文本。您可以了解更多here
我在使用 dart 的 web ui 包时遇到了一些问题。 首先,我看到 web ui 没有解释 html 标签。是不是可以使用,例如标签,将 html 代码注入(inject) div 或 html
我有一个动态填充的表,并且我已将一个 webui-popover 附加到每个表行。要使其可见,必须单击链接项。我使用手动触发器来控制其可见性。 然而,我的问题是,当一个弹出窗口可见时,当我单击弹出区域
您好,我一直在玩 Heritrix,并希望将其包含在网站上/允许远程 Web 访问它。 我有一个基于 Linux 的服务器,其中有一个托管网页,并且我构建了一个版本的 Heritrix。 问题是我现在
我启动了本地flink服务器(./bin/start-cluster.sh),并提交了作业。我有以下代码来定义自定义指标: .map(new RichMapFunction() { p
我已经在 ubuntu 13.x 上下载并安装了 chef-server-core_12.x DPKG 包 chef-server-ctl reconfigure 运行成功 但是当我尝试 URL ht
我安装了 qBittorrent docker。我在我的路由器上进行了转发;然后是使用 nginx 的反向代理;最后,docker 端口映射。 链条是: [Port forwarding on Rou
我在使用 webUI 时遇到样式问题。 当我注入(inject)数据值时,我的设计被破坏了。 在我的具体案例中,我的菜单显示不正确。据我所见,{{dataValue}} 的初始字符串长度为 0,并且在
我有几个不同的 Sidekiq 任务,它们是长时间运行的任务。这些任务是用来启动的,并且(几乎)永远不会停止。我看到的是,一段时间后我的任务不再显示在 Sidekiq Web UI 中: 但是,做一个
我正在尝试获取 WebUI-Popover jQuery 具有确认按钮,一个“保存”,另一个“取消”,这样我就可以显示/隐藏并对这两个事件运行其他操作! 例如:这样我就可以通过ajax将textare
我放弃了 Bootstrap 弹出窗口,转而寻找。我发现WebUI Popover它具有我正在寻找的所有功能。 但是我在使用页面上元素的 html 内容设置弹出窗口的标题时遇到问题。我在 consol
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题?通过 editing this post 添加详细信息并澄清问题. 7年前关闭。 Improve this
我是 iOS 应用程序开发新手。我的要求是开发一个应用程序,在用户登录时显示应用程序。 当用户打开应用程序时,会立即显示 Storyboard 启动屏幕,然后在显示登录页面供用户登录后显示空白屏幕。我
我有一个表格以表格形式将一些结果输出到屏幕。对于每个表格行,我都有一个带有图标(更多)的列。我想要实现的是,对于每个图标,在单击时,它会显示一个弹出窗口,类似于 Tidal 所做的。但到目前为止,它只
我正在尝试在 Katalon Studio 中编写一个测试用例,该用例将尝试根据预期值验证各个字段的内容。我正在使用 WebUI.verifyElementText() 函数来执行此操作。我知道正在找
我是一名优秀的程序员,十分优秀!