是否可以设置 SVG 图像的最小宽度(以 % 为单位)?因为它不适合我。对于图像也是如此。两者都设置为 100% 适合包含的 div。当我调整浏览器大小时,我希望图像在达到最小宽度时停止调整大小。
html
<div id="first">
<img href="" alt="si"/>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
#first{
background-color:black;
width:100%;
height:30%;
position:fixed;
overflow:hidden;
}
#first img{
width:100%;
min-width:50%;
}
Run Code Online (Sandbox Code Playgroud) 我试图将 Google Analytics 添加到我的网页,但 Thymeleaf 抛出错误org.xml.sax.SAXParseException: Referenz zu Entity "l" muss mit dem Begrenzungszeichen ";" enden.
翻译:在“l”之后实体必须以“;”结尾
任何想法如何解决这个问题?
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5SNB8LZ')
Run Code Online (Sandbox Code Playgroud)
错误是指谷歌分析代码的这一行
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
Run Code Online (Sandbox Code Playgroud) 在我的控制器中我使用CrudRepository方法findAll()来查找我的数据库中的所有用户,如下所示:
userRepository.findAll()
Run Code Online (Sandbox Code Playgroud)
问题是,这样做需要1.3分钟才能加载1.500个用户.从那里我用Thymeleaf在模型中加载数据我在一个html表中显示它:名称,时间创建,电子邮件,id,数据包和每个用户的状态.有没有办法提高性能或解决我的问题?任何帮助都会非常准确.
这是我的用户实体
@Id
@SequenceGenerator(name = "user_id_generator", sequenceName = "user_id_seq", allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "user_id_generator")
private Long id;
@Column(nullable = false, unique = true)
private String email;
@Column(name = "uuid", nullable = false, unique = true)
private String uuid;
@Column(name = "reset_pwd_uuid", unique = true)
private String resetPwdUuid;
@Column(nullable = false)
private String password;
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private Status status;
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private Packet packet = Packet.BASE;
@Enumerated(EnumType.STRING)
@Column
private Situation situation; …Run Code Online (Sandbox Code Playgroud)