<div target="_blank" class="P5DMenuAnimated" style="left: -80.8112px; top: -80.8112px; background-position: left -40px; opacity: 1; width: 40px; height: 40px;" action="clone"></div>
我正在Eclipse项目中使用PrimeFaces 6.2。 Grid CSS示例不起作用。我测试了以下sample。
正确的结果将类似于this。我使用了PrimeFaces的相同代码示例。我的结果没有反应。我的错误在哪里? 我的容器是tomcat 9.0。
web.xml下面
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd“>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>PrimeFaces Test</title>
</h:head>
<h:body>
<h:form>
<style type="text/css">
.ui-g div {
background-color: #ededed;
text-align: center;
border: 1px solid #fafafa;
}
</style>
<p:outputPanel>
<h3 style="margin-top: 0">Basic</h3>
<div class="ui-g">
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
<div class="ui-g-1">1</div>
</div>
<div class="ui-g">
<div class="ui-g-2">2</div>
<div class="ui-g-2">2</div>
<div class="ui-g-2">2</div>
<div class="ui-g-2">2</div>
<div class="ui-g-2">2</div>
<div class="ui-g-2">2</div>
</div>
<div class="ui-g">
<div class="ui-g-3">3</div>
<div class="ui-g-3">3</div>
<div class="ui-g-3">3</div>
<div class="ui-g-3">3</div>
</div>
<div class="ui-g">
<div class="ui-g-4">4</div>
<div class="ui-g-4">4</div>
<div class="ui-g-4">4</div>
</div>
<div class="ui-g">
<div class="ui-g-6">6</div>
<div class="ui-g-6">6</div>
</div>
<div class="ui-g">
<div class="ui-g-12">12</div>
</div>
<div class="ui-g">
<div class="ui-g-4">4</div>
<div class="ui-g-8">8</div>
</div>
<div class="ui-g">
<div class="ui-g-3">3</div>
<div class="ui-g-9">9</div>
</div>
<div class="ui-g">
<div class="ui-g-3">3</div>
<div class="ui-g-5">5</div>
<div class="ui-g-4">4</div>
</div>
<div class="ui-g">
<div class="ui-g-4">4</div>
<div class="ui-g-2">2</div>
<div class="ui-g-2">2</div>
<div class="ui-g-3">3</div>
<div class="ui-g-1">1</div>
</div>
<h3>Responsive</h3>
<div class="ui-g">
<div class="ui-g-12 ui-md-6 ui-lg-3">ui-g-12 ui-md-6 ui-lg-3</div>
<div class="ui-g-12 ui-md-6 ui-lg-3">ui-g-12 ui-md-6 ui-lg-3</div>
<div class="ui-g-12 ui-md-6 ui-lg-3">ui-g-12 ui-md-6 ui-lg-3</div>
<div class="ui-g-12 ui-md-6 ui-lg-3">ui-g-12 ui-md-6 ui-lg-3</div>
</div>
<div class="ui-g">
<div class="ui-g-12 ui-md-6 ui-lg-4">ui-g-12 ui-md-6 ui-lg-4</div>
<div class="ui-g-12 ui-md-6 ui-lg-4">ui-g-12 ui-md-6 ui-lg-4</div>
<div class="ui-g-12 ui-lg-4">ui-g-12 ui-lg-4</div>
</div>
<h3>Nested</h3>
<div class="ui-g">
<div class="ui-g-8 ui-g-nopad">
<div class="ui-g-6">6</div>
<div class="ui-g-6">6</div>
<div class="ui-g-12">12</div>
</div>
<div class="ui-g-4">4</div>
</div>
<h3>Sample Layout</h3>
<div class="ui-g">
<div class="ui-g-12 ui-md-2">Menu</div>
<div class="ui-g-12 ui-md-10 ui-g-nopad">
<div class="ui-g-12">
Bar
</div>
<div class="ui-g-12 ui-g-nopad">
<div class="ui-g">
<div class="ui-g-12 ui-md-4">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed imperdiet, orci nec dictum convallis, ligula mauris vestibulum turpis, nec varius tortor quam at diam. Nullam a viverra nibh. In tincidunt tempor lectus quis vulputate. Pellentesque nec dui aliquam, lobortis est in, lobortis ante</div>
<div class="ui-g-12 ui-md-4">Maecenas vel nisi aliquet, vulputate tortor id, laoreet massa. Maecenas mattis tristique bibendum. Suspendisse vel mi dictum, vestibulum lacus quis, pulvinar quam. Proin vulputate, nibh at finibus varius, leo eros lacinia elit, nec blandit odio tellus a justo. Donec nec ex auctor, tristique nulla nec, rutrum sapien.</div>
<div class="ui-g-12 ui-md-4">Proin efficitur in leo eget ornare. Nam vestibulum neque sed velit sagittis sodales. Sed scelerisque hendrerit magna a hendrerit. Cras tempor sem at justo pharetra convallis. Curabitur vel sodales purus. Vestibulum interdum facilisis nulla imperdiet suscipit. Quisque lectus felis, condimentum eget hendrerit sit amet.</div>
</div>
<div class="ui-g">
<div class="ui-g-6 ui-md-3"><p:graphicImage name="demo/images/nature/nature1.jpg" style="width:100%"/></div>
<div class="ui-g-6 ui-md-3"><p:graphicImage name="demo/images/nature/nature2.jpg" style="width:100%"/></div>
<div class="ui-g-6 ui-md-3"><p:graphicImage name="demo/images/nature/nature3.jpg" style="width:100%"/></div>
<div class="ui-g-6 ui-md-3"><p:graphicImage name="demo/images/nature/nature4.jpg" style="width:100%"/></div>
</div>
<div class="ui-g">
<div class="ui-g-12 ui-md-6">Phasellus faucibus purus volutpat mauris lacinia sodales. Ut sit amet sapien facilisis, commodo dui non, fringilla tellus. Quisque tempus facilisis nisi sodales finibus. Pellentesque neque orci, ullamcorper vitae ligula quis, dignissim euismod augue.</div>
<div class="ui-g-12 ui-md-6">Fusce ullamcorper congue massa, eget ullamcorper nunc lobortis egestas. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque ultrices dui eget dolor feugiat dapibus. Aliquam pretium leo et egestas luctus. Nunc facilisis gravida tellus.</div>
</div>
</div>
</div>
<div class="ui-g-12">
Footer
</div>
</div>
</p:outputPanel>
</h:form>
</h:body>
</html>
true->->
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Production</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>aristo</param-value> <!-- <param-value>mytheme</param-value> -->
</context-param>
<!-- <context-param> --> <!-- <param-name>primefaces.FONT_AWESOME</param-name> --> <!--
solo mia应用程序**没有测试-> 1个
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <!--
javax.servlet.jsp.jstl.fmt.localizationContext
资源应用
com.sun.faces.config.ConfigureListener