聚合物定位不会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
更多推荐
发布评论