小编afa*_*olo的帖子

重叠文本字段内的字体真棒图标

在如下所示的重叠中,如何防止标题和文本字段之间的大空间?

.icon-link-mail {
  position: relative;
  left: 485px;
  top: 29px;
  padding: 8px 8px 7px 8px;
  z-index: 2
}
Run Code Online (Sandbox Code Playgroud)

CSS:

<h3>Title</h3>
<form name="mail_form" id="mail_form" method="POST" action="">
  <label for="sendto">
              <a href="#"><i class="icon-envelope icon-2x icon-link-mail" style="color:#E4E4E4; text-decoration:none"></i></a>
              <input name="sendto" class="sendto" type="text" style="width: 98%; margin-bottom:10px" placeholder="Send to.." />
              </label>
</form>
Run Code Online (Sandbox Code Playgroud)

结果可以在这个小提琴中看到

谢谢.

css overlay font-awesome

6
推荐指数
1
解决办法
7960
查看次数

通过单击异步gridview中的图像,在访问上下文操作菜单时阻止活动重新加载

我有一堆来自sdcard的图像,它们在gridview上异步加载.一切正常,但是当通过长按任意图像访问多选上下文操作菜单时,整个活动将重新加载并再次加载所有图像.怎么预防呢?

Myadapter

public class PhotosGridViewImageAdapter extends BaseAdapter {

AsyncTaskLoadFiles myAsyncTaskLoadFiles;

public class AsyncTaskLoadFiles extends AsyncTask<Void, String, Void> {

    File targetDirector;
    PhotosGridViewImageAdapter myTaskAdapter;

    public AsyncTaskLoadFiles(PhotosGridViewImageAdapter adapter) {
        myTaskAdapter = adapter;
    }

    @Override
    protected void onPreExecute() {
        String ExternalStorageDirectoryPath = Environment
                .getExternalStorageDirectory().getAbsolutePath();
        String targetPath = ExternalStorageDirectoryPath + File.separator + AppConstant.PHOTO_ALBUM + File.separator;
        targetDirector = new File(targetPath);
        myTaskAdapter.clear();

        super.onPreExecute();
    }

    @Override
    protected Void doInBackground(Void... params) {
        File[] files = targetDirector.listFiles();
        Arrays.sort(files);
        for (File file : files) {
            publishProgress(file.getAbsolutePath());
            if (isCancelled()) break;
        }
        return …
Run Code Online (Sandbox Code Playgroud)

java android gridview

6
推荐指数
1
解决办法
128
查看次数

使用工具提示器动态更改工具提示标题中的一个元素

我在tooltipster title属性中有一组选项,如下所示:

<i class="icon-cog settings" title="
                   <div class='div1' onclick='follow(1,2)'>Content 1</div>
                   <div class='div2' ...>Content 2</div>
                   <div class='div3' ...>Content 3</div>
                                                   ">
</i>
Run Code Online (Sandbox Code Playgroud)

单击div1时,内容将根据以下函数通过ajax结果进行动态更新:

function follow(f1,f2) {
$.get('/exe/add_followers.php?f1=' + f1 + '&f2=' + f2, function (result) {
    $('.div'+f2).html('content 1 is updated to' + result.newcontent);
    }, 'json');
}
Run Code Online (Sandbox Code Playgroud)

问题是当关闭工具提示并且页面尚未刷新时,内容将返回初始值,而不是显示更新的值.

我试图用一个配置选项描述这里:

function follow(f1,f2) {
    $.get('/exe/add_followers.php?f1=' + f1 + '&f2=' + f2, function (result) {
        // $('.div'+f2).html('content 1 is updated to' + result.newcontent);
        $('.settings').tooltipster('update', 'content 1 is updated to' + result.newcontent);
        }, 'json'); …
Run Code Online (Sandbox Code Playgroud)

jquery tooltip tooltipster

1
推荐指数
1
解决办法
5013
查看次数

如何从md5迁移到sha256加密

我有一个包含数千个md5加密密码的数据库,我需要迁移到sha256.通过使用md5访问保留旧密码和使用sha256加密的新密码,最安全的方法是什么?谢谢.

encryption md5 sha256

0
推荐指数
1
解决办法
3468
查看次数