///需要对更大的屏幕应用媒体查询以进行调整,例如超过17英寸的屏幕。请帮我解决这个问题
.vertical-menu1 {
//Use this code For file picking
//On Buton method:
private void Button1_Click(object sender, System.EventArgs e)
{
Intent = new Intent();
Intent.SetType("image/*");
Intent.SetType("pdf/*");
Intent.SetType("doc/*");
Intent.SetAction(Intent.ActionGetContent);
//Intent.PutExtra(Intent.ExtraAllowMultiple, true);
StartActivityForResult(Intent.CreateChooser(Intent, "Select a File"), PickImageId);
//CreateChooser(Intent, "Select Picture"), PickImageId);
}
//On OnActivityResult Method:
protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
if ((requestCode == PickImageId) && (resultCode == Result.Ok) && (data != null))
{
//Bitmap bitmap = (Bitmap)data.Extras.Get("Select Picture");
Android.Net.Uri uri = data.Data;
image.SetImageURI(uri);
//image.SetImageBitmap(bitmap);
//GetImageFromURI(uri);
Toast.MakeText(this, "Path is " + GetImageFromURI(uri), ToastLength.Long).Show();
}
}
//GetImageFromURI Method:
public string GetImageFromURI(Uri contentURI)
{
Android.Database.ICursor cursor = ContentResolver.Query(contentURI, null, null, null, null);
if (cursor != null)
{
cursor.MoveToFirst();
string documentId = cursor.GetString(0);
documentId = documentId.Split(':')[1];
cursor.Close();
cursor = ContentResolver.Query(Android.Provider.MediaStore.Images.Media.ExternalContentUri,
null,
Android.Provider.MediaStore.Images.Media.InterfaceConsts.Id + " = ? ", new[] { documentId },
null);
cursor.MoveToFirst();
string path = cursor.GetString(cursor.GetColumnIndex(Android.Provider.MediaStore.Images.ImageColumns.Data));
cursor.Close();
return path;
}
return contentURI.Path;
}
答案 0 :(得分:2)
您可以使用:
@media all and (min-width: 17in) {
--- your CSS
}
答案 1 :(得分:0)
@media(最小宽度:1632px){
width: 149px;
height: 165px;
overflow-y: auto;
margin-left:605px;
margin-top:-165px;
}
//container
.vertical-menu1 a {
background-color: #FFFFFF;
color: #40404c;
display: block;
padding: 5px;
text-decoration: none;
font-family:openSans;
word-spacing: 0px;
letter-spacing:0px
}
//on hovering
.vertical-menu1:hover a {
color:blue;
font-size:13px;
}
.vertical-menu1:hover a{
font-weight:bold;
}
//Onhovering
.vertical-menu1:hover a{
text-decoration:underline;
}
}
答案 2 :(得分:0)
Now a days lage screen resulation start 1440px
@media only screen and (min-width: 1440px) {
width: 149px;
height: 165px;
overflow-y: auto;
margin-left:605px;
margin-top:-165px;
}
//container
.vertical-menu1 a {
background-color: #FFFFFF;
color: #40404c;
display: block;
padding: 5px;
text-decoration: none;
font-family:openSans;
word-spacing: 0px;
letter-spacing:0px
}
//on hovering
.vertical-menu1:hover a {
color:blue;
font-size:13px;
}
.vertical-menu1:hover a{
font-weight:bold;
}
//Onhovering
.vertical-menu1:hover a{
text-decoration:underline;
}
}