如何在visual studio 2012中使用mvc5将页面方向设置为左,右或中间 [英] How to set page orientation to left ,right or middle using mvc5 in visual studio 2012

查看:90
本文介绍了如何在visual studio 2012中使用mvc5将页面方向设置为左,右或中间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有登录页面,但我想根据客户要求左,右或中间登录部分。可以使用web.config中的app设置键或任何其他方法设置它。

I have Login page,but I want login section left,right or middle as per the client requirements .is it possible to set it using app setting key in web.config or any other method.

推荐答案

在appSteeing中添加一个名为你想要的变量并设置值(左,右,中)。



现在在登录div或外部div中,无论根据你的设计,使用float或text-align的行内css值为<% = common.orientation%>



add a variable in appSteeing named whatever you want and set the value(left,right,middle).

now in the login div or in the outer div, whatever according to your design put an in line css with float or text-align with the value of <%=common.orientation %>

<div style="float:<%=common.orientation %>">
    login form
</div>





和web.config中





and in web.config

<appSettings>
    <add key="orientation" value="left" />
</appSettings>





希望它能解决你的问题。



Hope it will solve your problem.


这篇关于如何在visual studio 2012中使用mvc5将页面方向设置为左,右或中间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆