![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
前端
robby1017591076
程序员的十层楼
展开
-
Java 从HTML页面生成图片的几种方法
1. html2canvashtml2canvas是一款js插件,需要在浏览器中打开html页面,调用js函数生成图片。1.1 使用示例https://codeload.github.com/usecodelee/JavaScript-screenshot/zip/refs/heads/master2.xhtmlrenderer这款插件挺难用的,需要将html转成xhtml,必须严格符合xml的规范才可以,页面中的js css都不好解析。2.1 maven添加引用<!--原创 2021-08-31 11:34:14 · 7898 阅读 · 1 评论 -
用DIV实现可扩展的input
我们在做前端时经常会遇到这样的需求:要求文本输入框可扩展。通常我们会想到使用textarea来代替input,但是textarea如果高度自适应时删除字符,高度不会立即改变到最小的高度。因此可以使用div来代替input。话不多说,直接上代码。以下代码完美实现了div来代替input,并模拟了input的placeholder属性。HTML:<div class="li-instea...原创 2018-07-27 00:20:09 · 1899 阅读 · 0 评论