聚合物定位不会100%(polymer positioning doesnt get 100%)

编程入门 行业动态 更新时间:2024-10-19 00:30:54
聚合物定位不会100%(polymer positioning doesnt get 100%)

我有以下问题。

我已经创建了一个新的pollymer元素,我试图让它填满整个页面。

问题是身体没有到达整个页面:/

这是我调用我的元素的页面:

<!DOCTYPE html> <html xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <META http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <META name="viewport" content="width=device-width, initial-scale=1.0" /> <h:outputStylesheet library="css" name="style.css" /> <script src="bower_components/webcomponentsjs/webcomponents.js" /> <link rel="import" href="bower_components/polymer/polymer.html" /> <link rel="import" href="my_polymer_elements/top_bar.html" /> <link rel="import" href="my_polymer_elements/left_bar.html" /> <title>Patrimônio</title> </h:head> <h:body> <!-- <my-top_bar userName="Thiago Kairala" profile="Administrador geral"></my-top_bar>--> <my-left_bar /> </h:body> </html>

这是我的元素:

<link rel="import" href="../bower_components/polymer/polymer.html" /> <link rel="import" href="menu.html" /> <polymer-element name="my-left_bar" attributes="systems departments"> <template> <style> :host { position: relative; display:block; height: 100%; } .left-bar { width: 15%; height: 100%; background-color: #ffcc29; border: 0; margin: 0; } </style> <div class="left-bar" start> <div class="menus"> <my-menu /> <my-menu /> </div> </div> </template> <script> Polymer({ }); </script> </polymer-element>

我做了身体,高度{margin:0;身高:100%;}

Im having the following problem.

I've created a new pollymer element and i`m trying to make it to fill the entire page.

The problem is that body doesn't get to the entire page:/

here is the page where i call my element:

<!DOCTYPE html> <html xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <META http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <META name="viewport" content="width=device-width, initial-scale=1.0" /> <h:outputStylesheet library="css" name="style.css" /> <script src="bower_components/webcomponentsjs/webcomponents.js" /> <link rel="import" href="bower_components/polymer/polymer.html" /> <link rel="import" href="my_polymer_elements/top_bar.html" /> <link rel="import" href="my_polymer_elements/left_bar.html" /> <title>Patrimônio</title> </h:head> <h:body> <!-- <my-top_bar userName="Thiago Kairala" profile="Administrador geral"></my-top_bar>--> <my-left_bar /> </h:body> </html>

here is my element:

<link rel="import" href="../bower_components/polymer/polymer.html" /> <link rel="import" href="menu.html" /> <polymer-element name="my-left_bar" attributes="systems departments"> <template> <style> :host { position: relative; display:block; height: 100%; } .left-bar { width: 15%; height: 100%; background-color: #ffcc29; border: 0; margin: 0; } </style> <div class="left-bar" start> <div class="menus"> <my-menu /> <my-menu /> </div> </div> </template> <script> Polymer({ }); </script> </polymer-element>

and i`ve made the body, height {margin:0;height:100%;}

最满意答案

https://www.polymer-project.org/0.5/docs/polymer/layout-attrs.html 。 尝试fullbleed或fit属性

https://www.polymer-project.org/0.5/docs/polymer/layout-attrs.html. Try fullbleed or fit attributes

更多推荐

本文发布于:2023-08-07 00:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1458864.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:聚合物   polymer   positioning   doesnt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!